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

SQL job on startup Expand / Collapse
Author
Message
Posted Tuesday, November 13, 2012 10:26 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, November 14, 2012 5:01 AM
Points: 42, Visits: 145
Hi All,

How could I run a sql job or maintenance plan on server startup?



Thanks
Post #1384189
Posted Tuesday, November 13, 2012 11:56 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:12 PM
Points: 13,357, Visits: 10,221
In a schedule, you can choose "Start automatically when SQL Server Agent starts" as the schedule type.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1384408
Posted Thursday, November 15, 2012 4:13 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, April 7, 2014 4:07 AM
Points: 5, Visits: 174
Hi,

have a look at this article:
http://www.databasejournal.com/features/mssql/article.php/3550601/Automatically-Running-a-Process-When-SQL-Server-or-SQL-Agent-Starts.htm

Regards.
Post #1385076
Posted Tuesday, November 20, 2012 2:58 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, January 8, 2014 4:53 AM
Points: 230, Visits: 41
Hi There are two ways to do it

1)If it is a sql agent job.you set the startup option in job schedule on to run at startup

2)If you have a procedure u need to enable it to run at startup using

sp_procoption @ProcName = 'YourSP',
@OptionName = 'startup',
@OptionValue = 'on'

Santhu
Post #1386766
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse