April 22, 2008 at 1:11 am
Hi all,
I am using Microsoft SQL Server Express Edition, Is it possible to create jobs in it. Jobs is like exceuting written stored procedure at some particular time so that it Updates the corresponding tables but i am not able to create any jobs in Microsoft SQL Server Express Edition.
April 22, 2008 at 1:59 am
Express does not include SQL Agent, hence you cannot create or run jobs.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2008 at 9:21 am
You don't have SQL Server Agent, but you do have the windows scheduler and a work around.
You need to create all of the stored procedures that you want the jobs to run as normal.
Then you create a batch file for each job that you wish to execute. Use the SQLCMD command line utility for this, as it has a lot of flexibility.
If you need a job to call another job you can just call one batch file from another.
If doing backups I recommend putting the date in as part of the filename in the format yyyymmdd and setting a threshold in your code to delete old backups, otherwise you end up with 1 backup file that just keeps growing (I made this mistake).
Then just set up your batch files to be executed by the Windows scheduler.
Done!
While this is not as flexible or powerful as a full copy of SQL Agent with a bit of imagination and a few extra Script files (or complete exe's) in the language of your choice you should be able to do a lot of the same things. It will take a lot more work however.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply