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 server agent jobs Expand / Collapse
Author
Message
Posted Wednesday, August 3, 2005 3:18 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 1:17 PM
Points: 765, Visits: 595

Hi,

Could anybody please tell me how to run sql server agent jobs using control-M?

I am new to Control-M so I will appreciate if somebody throw some loght on Control-M.

 

Thanks,

sree



Thanks,
SR
Post #207117
Posted Thursday, August 4, 2005 12:16 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, July 26, 2006 2:52 AM
Points: 225, Visits: 1
Sree,

It's actually quite easy, but you won't run the agent jobs as such.

Set up a CMD file to run under controlM. Within that batch file, you can use osql to run BACKUP commands, or if you set up a maintenance plan you can run the SQLMAINT.EXE utility and reference the maint plan to pull out the DBs to backup etc.

e.g SQLMAINT.EXE -S yourservernamehere -PlanName yourmaintplannamehere -BkUpDB C:\BACKUP -BkUpMedia DISK

See the BOL for details on the parms, and ways to use SQLMAINT and osql.

You can also parameterise your jobs and pass the parameters via ControlM - makes the jobs more flexible.

I'd suggest start with a basic script and then build up to the fancy stuff - parameters, error messages etc - once you have the basics sorted out.

Don't forget to call the appropriate ControlM exit code (success or failure) at the end of your job.



Post #207200
Posted Thursday, August 4, 2005 8:42 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 6:03 AM
Points: 2,900, Visits: 3,301

I definitely agree wit hqcp77's posting.  In any job management tool (Control-M, Tivoli, Unicenter,etc), the object is to replace the SQL Agent batch processing so you get the benefits of proper job scheduling.

This means you need to pull out of SQL Agent jobs the commands that are processed in each job step and build a Control-M job that duplicates each step.  I recommend that you talk you your BMC account manager or phone your local BMC help desk, as BMC probably has some tools to help with this work. 

Although you can get a Control-M job to run sp_start_job, you can also live on hotdogs, but most people prefer something a lot better.



Original author: SQL Server FineBuild 1-click install and best practice configuration of SQL Server 2014, 2012, 2008 R2, 2008 and 2005. 18 October 2014: now over 31,000 downloads.
Disclaimer: All information provided is a personal opinion that may not match reality.
Concept: "Pizza Apartheid" - the discrimination that separates those who earn enough in one day to buy a pizza if they want one, from those who can not.
Post #207390
Posted Thursday, May 10, 2012 1:00 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 1:50 AM
Points: 6, Visits: 172
Hi

Did anyone get a solution for this request. Could you please share or provide a sample bat file I can look at. I am new to Control M..

What I am trying to do is to import all jobs in the sql server job activity monitor automatically and not manually. Is this possible ?

Would appreciate the feedback.

Regards
Post #1297636
Posted Tuesday, September 18, 2012 10:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, September 3, 2014 10:51 AM
Points: 7, Visits: 81
I am not sure why this is thought of as a good idea. I have well over 100 sql instances and within sql server it is fairly efficient to manage the maintenance and backup of the databases. Transfering all those jobs and tasks and permissions and managing them from Control M wouldn't seem to be a good idea to me but i am open to hear others opinions on this. Not to mention management of the disk space the backups take and the handling of backup and/or other maintenance job failures.

Ron
Post #1360883
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse