SQL Server: Replicating SP execution- Will the subscriber Database be updated twice if the table and SP on the same table (that inserts\updates\deletes) are the articles in the same or different publi

Who is online?  38 guests and 0 members
home  »  blogs  »  Abhay Chaudhary  »  SQL Server: Replicating SP execution- Will the subscriber Database be updated twice if the table and SP on the same table (that inserts\updates\deletes) are the articles in the same or different publications

Training on Microsoft Products & Technologies

  Rate This Blog Entry:  register  or  login

Author

Abhay_c Abhay Chaudhary (Member since: 11/19/2011 7:36:26 AM)

View Abhay Chaudhary 's profile

Comments (3)

SQLChap
1/30/2012 9:36:55 AM SQLChap said:

As you have demonstrated the behaviour of stored procedures works well with replication. To get the best performance on your deletes you might have been better disabling replication and running the script of each of the databases in turn, obviously that would have required downtime so not necessarily an option.

Where you do have to be careful is when you have triggers that modify data, particulatly inserts, or updates that contatenate or add to values could be problematic. For those situations you can build the triggers with a "not for replication" clause on the create trigger statement.

http://msdn.microsoft.com/en-us/library/ms152529.aspx

by
admin
1/30/2012 10:53:15 AM Admin Admin said:

nice one...

by
Abhay_c
1/30/2012 3:33:16 PM Abhay Chaudhary said:

You are right in suggesting "To get the best performance on your deletes you might have been better disabling replication and running the script of each of the databases in turn, obviously that would have required downtime so not necessarily an option." becasue stopping replication might not be an option for many applications .There are not only deletes but inserts and updates as well .We can do deletes separately by disabling the deletes in replication but that means the Pub and Sub would be out of sync for some time .

by

Leave a comment

Name:
  *  
Email:  (your email is kept secure)
 *  
Website:

example: "http://www.SQLServerGeeks.com"

 
Type the characters:
 *
 
   

Training on Microsoft Products & Technologies

Training on Microsoft Products & Technologies

Email Subscriptions

   Get the Most Recent Blogs in your inbox
Blogs RSS Feed

Abhay Chaudhary's latest blog posts

Blogs RSS Feed

Latest community blog posts

  • SQL Server 2012 Virtual Launch Event Hi Friends, The SQL Server 2012 Virtual Launch Event Kicks off on March 7, 2012. To read more, click on this Link: http://blogs.technet.com/b/dataplatforminsider/a...
  • SQL Server 2012 Datasheet Hi Friends, Microsoft SQL Server 2012 is a cloud-ready information platform that will help organizations unlock breakthrough insights across the organization and quickly buil...
  • Entity Framework 4.3.0 released Hi Friends, Entity Framework is Microsoft’s recommended data access technology for new applications. The first fully supported go-live release of the migrations w...
  • Paging is a process of splitting large result set into subset of pages. So, instead of displaying 5000 records resulting from a search, first 20 records are shown and then next 20 and so on. In SQL Se...