1

In Sybase I can set replicate off/on in a procedure or DDL/DML Change Replication for the Current isql Session for sybase. Is there a similar way in a sql server ?

set replication [on | force_ddl | default | off]

The other linked question mentioned an article of using sp_MSstopdistribution_agent but I am not able to find it on the database. is it possible i need to have setreplication working ?

As the comment mentioned the linked answer explain how to pause all replication in the server however i am searching for a way to pause the current session only.

Moudiz
  • 7,211
  • 22
  • 78
  • 156
  • @Tanner it does contains any information only links , in the link it mentioned to use `sp_MSstopdistribution_agent` however I couldn't find on the database. should I have set a replication to another database in order that to be exists ? – Moudiz Oct 19 '17 at 08:39
  • 1
    Unless there's something else buried deeply in the referenced links, this question does **not** appear to be a duplicate as others have suggested; those links appear to show how to stop/disable **ALL** replication (and resume where left off once started back up??); the Sybase ASE command (`set replication ...`) disables replication for the single session that issues the command ... any transactions by current session are effectively skipped by the repagent ... in the mean time the repagent continues to replicate txns performed by other users/sessions – markp-fuso Oct 19 '17 at 13:58
  • Hmmm, can't write an 'answer' after Q marked as 'duplicate' sooo ... NOTE: I work with Sybase/SAP replication, I do not work with SQL Server replication ... take a look at these links that talk about customizing the sp_MSdel_* proc (for the table in question) to selectively disable deletes: [link#1](https://www.sqlservercentral.com/Forums/Topic741168-291-1.aspx) and [link#2](https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b762debb-6e9a-46b7-bf6b-5c367a8689dc/one-way-replication-with-no-delete?forum=sqlreplication) – markp-fuso Oct 19 '17 at 16:18
  • you are right @markp .. i vote to re open and i have edit the question – Moudiz Oct 19 '17 at 20:26
  • I don't know what the procedure is to (re)open a Q marked as 'duplicate'; it'll probably be easier/faster to post a new question, making sure to explicitly state that you're looking to disable replication at the connection/session level while allowing other connecontinue to be replicated; hopefully that'll be enough to keep non-SRS (Sybase/SAP RepServer) folks from jumping the gun – markp-fuso Oct 19 '17 at 20:59
  • You can run the dynamic sp_MSstart/stop procedures if you have a distribution database defined already. – access_granted Nov 01 '17 at 01:21

0 Answers0