|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 8:31 PM
Points: 312,
Visits: 1,857
|
|
All,
If you have 10 databases mirrored and if you only failing over 5 of them....you only need to disable the jobs related to that databases that you are failing over.....so, how can you get that list of jobs using t-sql. Please advise.
Thanks, SueTons.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: 2 days ago @ 2:07 PM
Points: 2,386,
Visits: 2,656
|
|
Check out sysjobs and sysjobsteps in the msdb database.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 8:31 PM
Points: 312,
Visits: 1,857
|
|
JeremyE (2/5/2013) Check out sysjobs and sysjobsteps in the msdb database.
Does anyone have any script for this?....Basically, I am looking for a script to get all the jobs with job names for a particular database and with execute command to disable those jobs....so, that I can copy the output and execute to disable them before I failover the database. Hope my requirement is clear.
SueTons.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 9:57 PM
Points: 32,893,
Visits: 26,771
|
|
JeremyE was trying to teach you something new, Sue. Take a look at the two tables he recommended and you'll see how easy it is to do.
--Jeff Moden "RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
|
|
|
|