Programming4us
         
 
 
SQL Server

Microsoft SQL Server 2008 R2 : Setting Up Replication (part 3) - Horizontal and Vertical Filtering

12/14/2011 9:25:51 AM

Horizontal and Vertical Filtering

During the publication creation process, you could have done some filtering of the data, either horizontally or vertically (or both at the same time). Figure 19 illustrates all you need to do to vertically filter (in terms of limiting what gets published to a subset of columns of a table). As you can see, you uncheck the AccountNumber column for the Customer table so that it isn’t included in the article for that object in this publication. This might be done because account number information needs to be more tightly controlled within your company and shouldn’t be part of what is viewed by any subscribing systems.


Figure 19. Specifying a vertical filter on the Customer table (limiting the columns to be published).



In addition, you can specify horizontal filters by using the Filter Rows option on a publication (publication properties). This allows you to specify horizontal filtering on any table you publish. Figure 20 shows a typical row filter on the Customer table that results in publishing North East Territory customers only (that is, those with TerritoryID values of 1 or 2).

Figure 20. Specifying a horizontal filter on the Customer table (limiting the rows to be published).

Join filtering allows you to limit the rows you will publish, via join criteria, to another table. Figure 21 shows a complex join that filters SalesOrderHeader rows that correspond to North East Territory customers only (that is, those with TerritoryID values of 1 or 2).


Figure 21. Specifying a join filter on the SalesOrderHeader table (limiting the sales rows that will be published by joining for the North East customers only).

Other -----------------
- SQL Server 2008 R2 : Basing the Replication Design on User Requirements
- SQL Server 2008 R2 : Planning for SQL Server Data Replication & SQL Server Replication Types
- SQL Server 2008 R2 : Replication Agents
- SQL Server 2008 : Replication - Subscriptions
- SQL Server 2008 : Replication Scenarios
- Protecting SQL Server Data : CELL-LEVEL ENCRYPTION - Special Considerations
- Protecting SQL Server Data : SCHEMA ARCHITECTURE STRATEGIES - Harnessing Linked Servers
- Monitoring SQL Server 2005 Performance : Using Windows System Monitor & Using SQL Server Profiler
- Monitoring SQL Server 2005 Performance : Monitoring and Recording Performance
- SQL Server 2008 R2 : Replication - The Publisher, Distributor, and Subscriber Magazine Metaphor
- SQL Server 2008 R2 : Replication - What Is Replication?
- SQL Server 2008 High Availability : Other HA Techniques That Yield Great Results & High Availability from the Windows Server Family Side
- SQL Server 2008 High Availability : Building Solutions with One or More HA Options
- SQL Server 2008 High Availability : The Fundamentals of HA
- Administering SQL Server 2008 with PowerShell : Step-By-Step Examples (part 4)
- Administering SQL Server 2008 with PowerShell : Step-By-Step Examples (part 3) - Performing a Database Backup
- Administering SQL Server 2008 with PowerShell : Step-By-Step Examples (part 2) - Common OS-Related Tasks
- Administering SQL Server 2008 with PowerShell : Step-By-Step Examples (part 1) - General Tasks & Scheduling Scripts
- PowerShell in SQL Server 2008
- Protecting SQL Server Data : SCHEMA ARCHITECTURE STRATEGIES - Using Database Object Schemas
 
 
Most View
- SQL Server 2008 Scheduling and Notification : Configuring the SQL Server Agent
- Windows Server 2008 : Configuring Wireless Access
- Active Directory 2008 : Proactive Directory Maintenance and Data Store Protection (part 4) - Performing Proactive Restores
- Understanding and Installing Active Directory Rights Management Services (part 3)
- BizTalk Server 2009: What is MessageBox direct binding?
- Uninstalling SharePoint 2010
- jQuery 1.3 : Headline rotator (part 7)
- Developing Applications for Windows Phone 7 : XAML Styling (part 1)
- Exchange 2007: Manage Public Folder Databases
- SharePoint 2010 : Get Started with Your Personal Site
Top 10
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 3) - Configuring Recipient Filtering
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 2)
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 1)
- Implementing Edge Services for an Exchange Server 2007 Environment : Installing and Configuring the Edge Transport Server Components
- What's New in SharePoint 2013 (part 7) - BCS
- What's New in SharePoint 2013 (part 6) - SEARCH
- What's New in SharePoint 2013 (part 6) - WEB CONTENT MANAGEMENT
- What's New in SharePoint 2013 (part 5) - ENTERPRISE CONTENT MANAGEMENT
- What's New in SharePoint 2013 (part 4) - WORKFLOWS
- What's New in SharePoint 2013 (part 3) - REMOTE EVENTS