|   | ![]() |
|
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 Click the Next button to show Figure 14-56.
Filter rows Just as it can be advantageous to replicate only selected columns, it can aslo be very useful to replicate ony a subset of rows in a table. A good example of this would be with sales data. You might have a data mart designed to analyze sales data based upon a specific product line, region, store, or salesperson. Horizontally partitioning the replication allows you to replicate only the subset of data that would be interesting to the data mart. In our case, we want to replicate sales data to all of the stores. However, each store is only allowed to see their data. To do this, we will partition the sales article. Click the ellipsis button after the sales table to display Figure 14-57.
Vertically partitioning a table. For this article, we will only be publishing sales data to the Eric the Read bookstore which corresponds to a Store ID of 6380. After entering the filter, click the OK button. You will see the filter reflected in Filter Rows screen. You should stick to simply criteria to use when filtering rows. If your filtering requires multiple tables and multiple columns, you will probably be better off creating replication stored procedures for this. When you click the Next button, you should see the same familiar options that lead to the completion of the Publication set up. Finish creating this Publication and close the Create and Manage Publications dialog.
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.