Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Express Edition and Compact Edition (2005)
 Schedule stored procedure

Author  Topic 

Mondeo
Constraint Violating Yak Guru

287 Posts

Posted - 2007-07-23 : 09:29:01
Hi,

I have a simple stored procedure that gets the date and then deletes any records older than 90 days.

What is the best way to schedule it? I've got it working now just as a widows scheduled task which excecutes it using sqlcmd.

Is this the correct approach or is there a way to schedule it from within sql server?

Thanks

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-07-23 : 09:31:20
since sql express doesn't have an agent this is the best way.

there is a 3rd party tool that simulates sql server agent for sql express which you can look up on google.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

tmitch
Yak Posting Veteran

60 Posts

Posted - 2007-07-23 : 21:51:31
You can set up a SQL Agent job on another server running the full version of SQL Server, if one is available. Alternatively, you can use the Windows integrated task scheduler and the command line SQL Server tools to kick off your job on schedule.

hth
Tim
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-07-24 : 14:40:36
Or set windows job to run the sp with sqlcmd.
Go to Top of Page
   

- Advertisement -