August 3, 2005 at 3:18 pm
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
August 4, 2005 at 12:16 am
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.
August 4, 2005 at 8:42 am
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: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.
When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara
May 10, 2012 at 1:00 am
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
September 18, 2012 at 10:14 am
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
June 11, 2015 at 2:28 am
hi
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply