Solution:
1. Run the below query to check the status of the subscription
1. Run the below query to check the status of the subscription
2. Note down the publisher_id, publisher_db, publication_id, subscriber_id, subscriber_db if the status is 0
- use distribution
- go
- select * From distribution..MSsubscriptions
3. Then update the status by runing the below query, apply the where condition value properly that you have noted in the previous step.
4. Check the replication monitor for any issues.
- use distribution
- go
- if exists (select * from distribution..MSsubscriptions where status = 0)
- begin
- UPDATE distribution..MSsubscriptions
- SET STATUS = 2
- WHERE publisher_id = 0
- AND publisher_db = 'Publisher_Db'
- AND publication_id = 16
- AND subscriber_id = 0
- AND subscriber_db ='Subscriber_Db'
- end
- else
- begin
- print 'All the subscription is Active'
- end
thanks it worked for me...appreciate for your help
ReplyDeletePerfect answer
ReplyDelete