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?  101 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

  • Dear SQL Geek, SQLServerGeeks.com cordially invites you to SQL Server Day, the monthly dose of SQL Server knowledge & learning. And after successful events in Bangalore, Kolkata & Mumbai, we a...
  • Hi SQL Geeks, The Microsoft® SQL Server® 2012 Feature Pack is a collection of stand-alone packages which provide additional value for Microsoft® SQL Server® 2012. You can download the ...
  • Hi Friends, Here is an interesting function: QUOTENAME() which returns a Unicode string with the delimiters added to make the input string a valid SQL Server delimited identifier. (from Books Online) ...
  • Hi All, It is a great news to all those who use SQL Server Express editions. Microsoft has increased the database size limit of SQL Server 2008 R2 Express edition from 4GB to 10GB. Previous versions o...
  • Hello Friends, It’s been a while that I have posted any blog. So here it is- Well with the arrival of SQL Server 2000, Microsoft has introduced the concept of User Defined Function (UDF). So the...
  • Exciting news! SQL Server 2012 has released to manufacturing. Customers and partners can download an evaluation of the product today and can expect general availability to begin on April 1. Microsoft ...