Tuesday, June 28, 2016

Adding table to replication publication witth out re intialilzing



 --First Check
 exec sp_helppublication 'ABC_PUB'
GO


--should be
--immediate sync=0
--allow_anonymus=0
--Run on your publisher database
EXEC sp_changepublication
@publication = 'ABC_PUB
@property = 'allow_anonymous' ,
@value = 'false'
GO
EXEC sp_changepublication
@publication = 'ABC_Pub',
@property = 'immediate_sync' ,
@value = 'false'
GO



 Step3:
exec sp_refreshsubscriptions 'ABC_Pub'
GO

Step4:
run SNAPSHOT agent at Replication Monitor --view snapshot agent and start
--http://www.sanssql.com/2011/01/sprefreshsubscriptions-useful.html
--go and see the count of new tables added to replication

--DO NOT TOUCH LOG READER AGENT OR DISTRIBUTOR AGENT --THEY run 24X7
Step4:
--Run on your publisher database
EXEC sp_changepublication
@publication = 'ABC_PUB',
@property = 'allow_anonymous' ,
@value = 'True'
GO
EXEC sp_changepublication
@publication = 'ABC_pub',
@property = 'immediate_sync' ,
@value = 'True'
GO


---on Subscriber  Check
USE ABC
go
SELECT Count(*) from table added--4434



No comments:

Post a Comment

https://blog.sqlauthority.com/2009/06/27/sql-server-fix-error-17892-logon-failed-for-login-due-to-trigger-execution-changed-database-context...