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

Set up jobs on SQL Server 2012 Servers in AlwaysOn configuration Expand / Collapse
Author
Message
Posted Thursday, September 19, 2013 3:39 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, July 11, 2014 2:21 PM
Points: 517, Visits: 219
Hello everybody,

I am a SQL DBA and need some help.
We currently have two 2012 SQL Servers in High Availability.

I scripted and placed the jobs on both Servers and added the 1st step to all them utilizing the following script:

IF dbo.fn_hadr_is_primary_replica ('db_name') <> 1
RAISERROR('This is not the preferred replica, exiting with success',11,1)

So, the jobs are basically running according to their schedules on both Servers, and exiting the 1st step with Success if: dbo.fn_hadr_is_primary_replica ('db_name') <> 1

It works fine. but this is not a fancy solution at all.

For example, since the SSIS Packages reside in the Catalogs that I created, for executing them it does not matter from which job and on which Server they are running.

Is there a way do something like that with the jobs; anotherwords set some Centralized location for them and run all the jobs from this location?
Or maybe there anybody is aware of a better way to set up the jobs in AlwaysOn?

Any help with this matter will be greatly appreciated.
Thank you.

Alex



Post #1496619
Posted Tuesday, September 24, 2013 2:57 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 14, 2014 4:48 AM
Points: 2,834, Visits: 3,950
You have kept your question at WRONG tab ..Sql Server 2005 . you soould have been used the "Sql 2012" tabs to get the hits.

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1497712
Posted Tuesday, September 24, 2013 9:03 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, July 11, 2014 2:21 PM
Points: 517, Visits: 219
And I was wondering why there are no answers :)

Thanks a lot.
I will re-post it in SQL2012.

Alex



Post #1497930
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse