question

artistlover avatar image
artistlover asked

Transactional Replication

I need to run script to remove an article so my SSIS package can run successfully. Then re add it once the ssis is complete. i created the following EXEC sp_droparticle @publication = N'xxipublisher', @article = N'tbldistricts', @force_invalidate_snapshot = 1; USE GO exec sp_addarticle @publication = N'xxpublisher', @article = N'tbldistricts', @source_owner = N'dbo', @source_object = N'tbldistricts', @destination_table = N'', @type = N'logbased', @creation_script = null, @description = null, @pre_creation_cmd = N'drop', @schema_option = 0x00000000000000F3, @status = 16, @vertical_partition = N'false', @ins_cmd = N'CALL sp_MSins_tbldistricts', @del_cmd = N'CALL sp_MSdel_tbldistricts', @upd_cmd = N'CALL sp_MSupd_tbldistricts', @filter = null, @sync_object = null GO After running these the log reader agent could not start. The process could not execute 'sp_replcmds' the ANy thoughts ideas? Maybe this is all wrong anyway.
transactional-replication
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
JohnSterrett avatar image
JohnSterrett answered
See if you can reinitialize the single article(s) that need to be removed and added back. Here is a link with great instructions on this process. http://www.rdx.com/Blog/dba_tips/2010/10/reinitializing-a-single-article-in-a-publication/
3 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I will give this try. One question is there a way to start snapshot via tsql?
0 Likes 0 ·
According to this MSDN article, it looks like you just have to start the snapshot agent job - https://technet.microsoft.com/en-us/library/ms147352%28v=sql.105%29.aspx -- Start the Snapshot Agent job. EXEC sp_startpublication_snapshot @publication = @publication; GO
0 Likes 0 ·
I ran all this and it ran successfully but i can't see the table in database
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.