72465

SQL Server - Transactional Replication (partial data only)

Question:

I have 6 months of data, how do I replicate only the most current 3 months of data to the subscribers?

Answer1:

You can use filtered replication. When you read examples about filtered replication, you'll probably see it referring to a branch office scenario where a single central office stores data for several branch offices, and each branch only wants to replicate their own data. It involves creating filters on a key, and in your case, you'll want to use your date range as the key.

Here's an <a href="http://sqlserverpedia.com/wiki/Creating_Transactional_Replication_Publications" rel="nofollow">article on filtered replication with transactional replication</a>, and another on <a href="http://sqlserverpedia.com/wiki/Creating_Merge_Replication_Publications" rel="nofollow">filtering with merge replication</a>.

Recommend

  • How can I migrate svn to a new system , without root access to system
  • Draw Line chart on top of Bar chart in SSRS?
  • How to do “(df1 & not df2)” dataframe merge in pandas?
  • Why is this jQuery reference '$(“”)' instead of '$(“”)'?
  • What do internal compiler error messages mean, and what can I do?
  • Why does an array get passed by value some times and not others?
  • Which devices/recommended sizes should I target with mediaqueries?
  • C# foreach - Is collection computed with each iteration? [duplicate]
  • Anybody have any idea how the divs are emitted in pinterest.com?
  • How do I prepend to a stream in Bash?
  • jquery full calendar
  • Open an application in a space using applescripts
  • Spring security - same page to deliver different content based on user role
  • Synchronize windows folders
  • Find group of records that match multiple values
  • Who propagate bugfixes across branches (corporate development)?
  • SAVE attribute needed for Fortran variables when only the C_LOC address is returned to a C program?
  • Looking for good analogy/examples for monitor verses semaphore
  • Array with custom indexes in Ionic2
  • How to write order and limit within cakephp joins array
  • Allowing both email and username for authentication
  • Handling un-mapped Rest path
  • How to rebase a series of branches?
  • R - Combining Columns to String Based on Logical Match
  • Sails.js/waterline: Executing waterline queries in toJSON function of a model?
  • Jenkins: How To Build multiple projects from a TFS repository?
  • Javascript + PHP Encryption with pidCrypt
  • Redux, normalised entities and lodash merge
  • Do create extension work in single-user mode in postgres?
  • How do I rollback to a specific git commit
  • InvalidAuthenticityToken between subdomains when logging in with Rails app
  • SQL merge duplicate rows and join values that are different
  • embed rChart in Markdown
  • Qt: Run a script BEFORE make
  • LevelDB C iterator
  • Can't mass-assign protected attributes when import data from csv file
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • How can I use `wmic` in a Windows PE script?
  • Unable to use reactive element in my shiny app
  • Conditional In-Line CSS for IE and Others?