|   | ![]() |
|
Replication Primer 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Selecting the Commands tab will display Figure 14-27.
Overriding replication commands with custom stored procedures Customizing replication with stored procedures is a very advanced topic that is beyond the scope of this book. What they allow you to do is replace any of the replication commands with custom stored procedures that provide advanced functionality particular to your envronment. These procedures will be created on the subscriber. Then instead of replication issuing an insert, update, or delete, it will call the stored procedure that you specified to replcae that command on the Subscriber passing it the data to be replicated. The stored procedure takes this data as input parameters and processes it on the subscriber according to the commands contained in the stored procedure. You are free to customize this stored procedure to suit your exact needs. A good example of this would be for sites where you replicate a transaction database to a Decision Support server. You could use replication to send the data to stored procedures at the Subscriber. The stored procedure would then add the data to a history table while also splitting and aggregating the data before inserting it into multiple tables in the DSS database.
Replication Primer 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
All content on this site, except where noted, represents an original work of Michael R. Hotek and is protected by applicable copyright laws. The SQL Server FAQ is the sole work of Neil Pike. No page, portion of a page, or download may be used for commercial purposes in whole or in part without the express, written permission of the applicable author.