Hi,@Anitha John
Your needs are vague and we don't know exactly what you want? Do you want to ask about the aspects that need to be paid attention to when using SP stored procedures ? Please read this document in detail.
Bert Zhou
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi team,
I am using scripts to create Publication, articles and subscriptions using the procedures, sp_addpublication, sp_addpublication_snapshot, sp_addarticle, sp_addsubscription, sp_startpublication_snapshot, sp_addpullsubscription. It is working fine.
Now I should be able to add, remove or update the publication. What are the steps to follow using sql scripts.
Thanks & Regards,
Anitha
Hi,@Anitha John
Your needs are vague and we don't know exactly what you want? Do you want to ask about the aspects that need to be paid attention to when using SP stored procedures ? Please read this document in detail.
Bert Zhou
Hi, @Bert Zhou-msft ,
I have created SQL Server replication transaction with out using SSMS. I used scripts for that.
My question was how can I re-initiate the subscription when the publication articles changes like adding an extra column in a table or removing table etc. without using SSMS. I tried using sp_reinitsubscription, but I didn't work.
What are the steps to follow to change an article and reflect that change in the subscriber. (Not using SSMS, but the scripts and steps for that)
Thanks & Regards,
Anitha
Hi @Anitha John ,
Welcome to Microsoft Q&A!
Please refer to this official document: https://learn.microsoft.com/en-us/sql/relational-databases/replication/reinitialize-a-subscription?view=sql-server-ver16
This document contains the SSMS approach and the sql script approach.
I tried using sp_reinitsubscription, but I didn't work.
Only members of the sysadmin fixed server role, members of the db_owner fixed database role, or the creator of the subscription can execute sp_reinitsubscription. You can check it.
Best regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.