June 22, 2006 at 8:14 am
Probably an easy one: I have a .sql file that updates my DB that I would like to have automatically kickoff daily. I am not familiar with how to design this, whether it be through Integration Services or a batch file?? Any help would be greatly appreciated. Thanks in advance.
June 22, 2006 at 8:26 am
You can create SQL agent job to run sql file and schedule it to run daily.
Thanks,
SR
Thanks,
SR
June 22, 2006 at 9:59 am
integration services would be the best bet
although in theory you could use windows scheduler and .sql script
June 22, 2006 at 10:01 am
Thanks for the help so far, does anyone have an example of any of the above posts?
June 26, 2006 at 3:22 am
In Management Stuido, Open SQL Server Agent, then Jobs, and click on jobs.
Right click on the pane, and 'create new job'. Give it s good, descriptive name and preferably a description.
Clicks on the 'steps' and use the 'new' button at the bottom of the pane to create a new step. this will be what runs your SQL.
In the STEP pane, give the step a decent descriptive name, leave TYPE as transact-SQL, set run as to a reasonable user (don't use sa etc. UNLESS YOU NEED TO). Use least rights required principle.
Copy and paste your SQL into the command pane. PARSE it to ensure it's all good.
Set DB if necessary - I usually think it's good practice to set to required target database.
You are done with the SQL (unless you need to add more steps, and start playing about with control logic).
Click OK. Now go to the schedules page. Add a new schedule, and define it per your requirements.
Consider setting up alerts and notifications, especially for failures!
HTH
June 26, 2006 at 7:21 am
Great instructions, I'll give it a try. Thanks!
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply