Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

We have a three server cluster using AlwaysOn technology, and have created an Availability Group for the SSISDB catalog.

How would you change the code to only execute on the primary server?

share|improve this question
Can you please define "the code"? – Aaron Bertrand Jan 17 at 16:00

1 Answer

If you're talking about accessing the primary replica (and the Availability Group database on the primary replica) at all times, this is where the Availability Group Listener comes into play.

See this quote from BOL on the topic:

You can provide client connectivity to the primary replica of a given availability group by creating an availability group listener. An availability group listener provides a set of resources that is attached to a given availability group to direct client connections to the appropriate availability replica.

So instead of referencing a particular server, by using the Listener you can be pointing at the current primary replica of the AG.

BOL reference on Availability Group Listeners

Edit: As per Aaron's comment below, you may be looking for more specifics surrounding the particular catalog DB (as opposed to generic handling as above). You can find more information regarding this on the MSDN SSIS blog here. If both of these points explained in this answer do not clear up your question, please clarify what exactly you're looking to do.

share|improve this answer
I think he means the SSIS code, but at the very least the question is ambiguous. – Aaron Bertrand Jan 17 at 15:56
@AaronBertrand Good point. I have edited and put a link to an MSDN blog post that may or may not answer his question. – Thomas Stringer Jan 17 at 16:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.