Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

schedule Stored procedure using SQL server management studio Expand / Collapse
Author
Message
Posted Wednesday, June 4, 2008 9:19 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 3, 2008 11:17 AM
Points: 6, Visits: 18
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
Post #511466
Posted Wednesday, June 4, 2008 9:21 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, June 27, 2014 12:43 PM
Points: 13,872, Visits: 9,596
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
Post #511472
Posted Wednesday, June 4, 2008 9:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 3, 2008 11:17 AM
Points: 6, Visits: 18
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.
Post #511499
Posted Wednesday, June 4, 2008 11:17 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, June 27, 2014 12:43 PM
Points: 13,872, Visits: 9,596
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
Post #511595
Posted Wednesday, June 4, 2008 3:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 3, 2008 11:17 AM
Points: 6, Visits: 18
still same error message.
Post #511811
Posted Wednesday, June 4, 2008 8:14 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Wednesday, October 15, 2014 9:14 AM
Points: 9,294, Visits: 9,483
Can you create any other Jobs or job steps?

-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #511897
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse