Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schedule execution of stored proceedure??

Status
Not open for further replies.

hinchdog

Programmer
Feb 14, 2001
380
US
I'm just getting started with stored proceedures and was wondering if there was an easy way to schedule one to execute at different time intervals. I need to designate one person in a database as "administrator". Than, after say 6 hours, I want to designate the next person in the database as "administrator" and set the old admin back to an oridary user. I don't think I'll have problems with the sp code, but how do I get it to execute every 6 hours? Thanks.

-Hinchdog
 
Yes, there is... SQL Server Agent.

Or in 6.5, goto Scheduled Task and schedule it in there. Andel
andelbarroga@hotmail.com
 
Thanks. But I may have been a little too confident think I could write the sp myself. Can you help me get started? I need to find the user whose "current" field is True, set it to false, then move to the next user and set their current field to true. However, if there is no next record, i need to go back to the first user in the database. Can I put this all into one sp, or do I need many. Excuse my ignornace! Thanks.

-Hinchdog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top