Re: Removing rows on subscribers, but not on publishers

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Hilary Cotter (hilary.cotter_at_gmail.com)
Date: 01/08/05

  • Next message: chora: "Re: error 80004005 28514 17"
    Date: Sat, 8 Jan 2005 10:57:57 -0500
    
    

    I think what you want to do is to manipulate your agents so that they change
    to download only (-ExchangeType download) when you delete rows on your
    subscriber, and then both (-ExchangeType both) under normal operations.

    This will only work if the deletes occur in isolation. For instance if the
    only activity occuring on your subscriber was the delete, this would work.
    If there were deletes and updates and inserts occuring on your subcriber
    with the ExchangeType of download the inserts and deletes would not make it.

    "Eli Tucker" <eli-news@nerdmonkey.com> wrote in message
    news:1105046696.732620.46610@f14g2000cwb.googlegroups.com...
    > Hello.
    >
    > I'm looking for a way to remove data from a merge replicated database
    > that would be filtered out if it was synchronized for the first time
    > today. In addition, I don't want the new rows to be deleted from the
    > publisher's database.
    >
    > Let me explain. We have several tables that look similar to the
    > following:
    >
    > TableA:
    > Id uniqueidentifier
    > Value varchar(50)
    > TimeStamp datetime
    >
    > We have a merge replication publication with filters that specify that
    > data with a TimeStamp older than 14 days should not be synchronized,
    > similar to the following:
    >
    > exec sp_addmergefilter @publication = N'MyPub', @article = N'TableA',
    > @filtername = N'TableA_TableB', @join_articlename = N'TableB',
    > @join_filterclause = N'{snipped}... and TableA.TimeStamp > ( GETDATE()
    > - 14 )', @join_unique_key = 0
    >
    > What ends up happening is that new rows with a recent TimeStamp is
    > synchronized to the client as desired. If the client syncs again after
    > 14 days, however, this now "stale" data is still present on the client
    > -- it does not become deleted.
    >
    > If we manually try to remove the stale data by running a query such as
    > "DELETE from TableA where TimeStamp > (GETDATE() - 30)", the data is
    > deleted. But the next time the database is synchronized, the data is
    > also deleted from the publishing database. This is not acceptable in
    > our application.
    >
    > Some of our clients use SQL CE on Pocket PC's with limitted storage
    > capacity and thus will not be able to continue to store this old data.
    >
    >
    > Any ideas on how to delete the old data from the SQL CE subscriber's
    > databases without having the side effect of removing the data from the
    > publishing database?
    >
    > Thanks in advance for your time.
    >
    > - Eli Tucker
    >


  • Next message: chora: "Re: error 80004005 28514 17"

    Relevant Pages

    • Re: Concurrency Help
      ... The timestamp column is changed whenever ANY data in the row is ... >> An UPDATE operation with a focused WHERE clause is an atomic operation. ... I want to know if a database, ... >>> 1 would overwrite client 2's changes to the db. ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: Removing rows on subscribers, but not on publishers
      ... to download only when you delete rows on your ... > I'm looking for a way to remove data from a merge replicated database ... > data with a TimeStamp older than 14 days should not be synchronized, ... > synchronized to the client as desired. ...
      (microsoft.public.sqlserver.replication)
    • Re: Counterpart to MS Enterprise Manager?
      ... Edition database. ... What words am I looking for so I don't download the ... Standard Edition, Standard Edition One, and Enterprise Edition ... (Including Client, Gateways, Grid Infrastructure, more) ...
      (comp.databases.oracle.server)
    • Re: Pure client-side javscript database?
      ... >>> last thing you want to do is have the client download an entire ... he didn't say anything about downloading an entire database. ... > client-side javascript then the data has to go to the client. ... >> DHTML as a display device, and never connect to a server. ...
      (comp.lang.javascript)
    • Re: Slow copying to container fields
      ... runtimes into the database and I wondered if there ... server,with just a calculated download link displayed in IWP? ... Then create an import routine in this. ... the data you want to export and let the client run the import routine. ...
      (comp.databases.filemaker)