SQL Replication - Post Tracer Token error due to no active subscriptions
I was trying to get all the SQL Server replication’s publication that has subscriptions. Then for each publication, post a tracer token thru cursor.
I encountered the below error.
Error:
Msg 21488, Level 16, State 1, Procedure sp_MSrepl_posttracertoken, Line 136 [Batch Start Line 4] No active subscriptions were found. The publication must have active subscriptions in order to post a tracer token.
To fix this error, I have added a WHERE
clause and filtered out the virtual
destination db and subscription status = ‘active’