We help IT Professionals succeed at work.

automatic stored procedure?

khinklenj
khinklenj asked
on
Medium Priority
947 Views
Last Modified: 2008-01-09
hello,
I am writing a SP that is being executed daily or weekly. Just want to get some starting points. If you have any suggestions or samples, please let me know.
Thanks,
Comment
Watch Question

Commented:
use a sql Agent job to schedule the execution of your SP

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Database Engineer
CERTIFIED EXPERT
Top Expert 2005
Commented:
Sounds great...what are you asking?  How to schedule it to run on a recurring basis?

Management -> SQL Server Agent -> Jobs
Create a new job either placing the stored procedure code in a new step or just execute the stored procedure, set the schedule, you're done.

Author

Commented:
I have sql server 200- developer edition. Do you think i can do this from my sql server client?
Brian CroweDatabase Engineer
CERTIFIED EXPERT
Top Expert 2005

Commented:
you can do it from enterprise manager.
AneeshDatabase Consultant
CERTIFIED EXPERT
Top Expert 2009

Commented:
One more option :

create a DOS batch file say 'schedule.bat' containing the following Query

osql -E  -H-1 -Q "select *exec urSpName urArgs"


You can shcedule this batch file to run using Windows Task Scheduler
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.