Wednesday, March 28, 2012

Information needed on jobs !

Hi
I please need your help on jobs. I am new to it !
For all our world wide customers, I need to have a sql
script that will create a job to be run on each production
database. This will just call a stored procedure that
will update data in that DB.
1) what minimum permissions or roles are needed to create
a job ?
2) NB NB:: can a job be scheduled to run based on the
results of a sql stamenent ?
E.g. run every getdate() + (select no_of_days from .....)
Your help is appreciated immensely !!
Thanks
Tania1. Anybody in public role can create a job.
2. I am not sure if I understood this correctly or not. You can write a
cursor/loop to iterate through each rows in your resultset and call the
sp_add_jobschedule/sp_update_jobschedule procedures. If you are asking about
running a job, you can use the sp_start_job stored procedure. All details
regarding these procedures can be found in SQL Server Books Online.
--
- Anith
( Please reply to newsgroups only )

No comments:

Post a Comment