Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

Question on Alwayson and sql agent job

$
0
0
Hi All, We are in process of implementing AG in SQL 2014. I am facing issues while checking jobs. I have created the jobs on both nodes. However, I want the jobs to be executed only on primary. For this, I started introducing a new step inside the sql agent job which will be my 1st step which checks whether it is Primary or not.If not primary, I want the job to quit with Success else I want to proceed to next step as it is Primary.But i wasn't able to adjust the Advanced option of 1st step where i am checking whether isPrimary or not. Can we adjust the advanced options of setting @on_success_step_id programmatically in 1st step itself... or Is there a better way to do this.If anyone share that piece of logic would be a great help.Thanks in Advance.

Viewing all articles
Browse latest Browse all 6525

Trending Articles