June 4, 2008 at 9:19 am
Hi:
I want to run a stored procedure every day and hence wanted to scedule it using SQL server Agent in SQL server management studio. How do I do this? Any help will be appreciated.
Thanks
June 4, 2008 at 9:21 am
Right-click the Jobs tab, select Create New Job. Add the proc as a step in the job, add the schedule you want. If you're comfortable with the usual Windows tabs and forms, it should be easy enough to figure out once you're in the form.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
June 4, 2008 at 9:44 am
Thanks for replying. I have tried to do that but it gives me a error "unable to cast object of type 'Microsoft.sqlserver.management.smo.simpleobjectkey' to type microsoft.sqlserver.management.smo.agent.'jobobjectkey'."
I ma not sure where i am doing wrong.
I clicked on job. then slect new. In steps I select new. In step screen there are parameter I set
type:t-sql
database: name of my datbase
then copied the procedure in command window.
I am not sure what is wrong.
June 4, 2008 at 11:17 am
Instead of copying the proc into the command window, just put the name of the proc there. Usually, with "dbo." in front of the name. Try that.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
June 4, 2008 at 3:10 pm
still same error message.
June 4, 2008 at 8:14 pm
Can you create any other Jobs or job steps?
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply