I am a newbie to this Replication concept and I am trying to build some scripts to automate our Build Process where we will be disabling/re-enabling Replication on a regular basis.

Background: We have an Application Database Server which is on High Availability (Primary & Secondary Nodes). Our Staging Database Server will be communicating with the HA Group either through a Load Balancer or Listener.

Requirement: We would like to enable Replication at the Table level and not the Database level from HA Group to the Staging Server as we are only interested in few tables. Is this even possible? If so, I am looking for some scripts (from your Toolbox, if you have any) to create Publisher, Distributor, and Subscriber and then disable/re-enable them on a regular basis during our Build process.

Note: This would be more of a "Pull" and I am looking for Scripts that can be executed from the HA Group as part of the Build Process.

Your help with this is very much appreciated.

Thanks!

Transactional replication should be able to do your requirement of replicate some specific tables, as long as they have primary key.

For CDC I have not used and can't say if will work or not.

Regarding the scripts you should be able to generate them when creating the replication setup.

  • Hi @dbamex, thank you for the reply. Yes, we are planning to do Transactional Replication. Since, I don't have the "sa" privileges I am not able to setup using the Wizard. That's why I am trying to script everything with the Server/Object names from the Source to Target so that someone who has permissions can execute the script for us. Please let me know if you need more information. – Julaayi Nov 16 at 19:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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