Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Sql server agent jobs


Sql server agent jobs

Author
Message
sree-226516
sree-226516
Right there with Babe
Right there with Babe (773 reputation)Right there with Babe (773 reputation)Right there with Babe (773 reputation)Right there with Babe (773 reputation)Right there with Babe (773 reputation)Right there with Babe (773 reputation)Right there with Babe (773 reputation)Right there with Babe (773 reputation)

Group: General Forum Members
Points: 773 Visits: 609

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
gcp777
gcp777
SSC Veteran
SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)

Group: General Forum Members
Points: 229 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.



EdVassie
EdVassie
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3644 Visits: 3829

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 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005. 1 Dec 2016: now over 39,000 downloads.
Disclaimer: All information provided is a personal opinion that may not match reality.
Quote: "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
farzanaparker944
farzanaparker944
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 173
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
Ron Sexton
Ron Sexton
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 95
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
more7polska
more7polska
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 9
hi
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search