cancel
Showing results for 
Search instead for 
Did you mean: 

exclude a table from publication SQL REMOTE

Baron
Participant
1,542

Is there any way to exclude a specific table from replication (SQL Remote) (in a way to ignore the past and current changes on this table).

  • With: ALTER PUBLICATION pub1 DELETE/DROP TABLE table1;
    This ignores only the changes after executing this statement (so the past changes will still be replicated).

  • With: STOP SUBSCRIPTION TO pub1 FOR remote1;
    This ignores all changes as I want (i.e. ignores even the changes before executing this statement), but the problem here I cant define a specific table, but I should define a whole pbulication (but I want only one specific table)!!!

Is there any way to stop the subscription for a specific table?

Accepted Solutions (1)

Accepted Solutions (1)

Breck_Carter
Participant
0 Kudos

Perhaps you should seriously consider MobiLink.

Answers (2)

Answers (2)

regdomaratzki
Product and Topic Expert
Product and Topic Expert

No, this is not possible.

Before trying to think of a workaround for your problem, I'd like to understand it. If the table is intended to be no longer replicated, but still locally used, you're violating the idea of occasionally connected replication by creating a dependency upon the time an operation was replicated.
Due to the way SQLRemote replication control is stored - inside the xact.log, together with the logged row operation(s) - I'm quite confident that this is not possible on SQLRemote level. What has been written to the xact.log must not be changed any more. If you manage to create a set of INSTEAD OF triggers against the table on each receiving side, that might do the job. But then, this also has to be arranged outside SQLRemote, and depending on how tightly or loosely the nodes are coupled. manually corrupting the continuity of replication messages by deleting the oldest message not received yet may buy you the time required to get this organized.
All these actions massively affect the consistency of replication (on a conceptual level, not necessarily on the level of your setup), so I guess you might be better off by letting the replication run dry and fix the results afterwards with e.g. passthrough operations.

HTH

Baron
Participant
0 Kudos

I am not thinking of a workaround. I am trying to find some already existing statement to solve an already happened error in DB.

Baron
Participant
0 Kudos

The goal is not finding a way how I can ignore the changes on the receiver, but how can I tell the sender to ignore these changes.

So I dont care anymore about the consistency/correctnes of the information on this specific table, but I am thinking of the health of my PC because it does now nothing rather than allocating resources for DBREMOTE which in turns does nothing rather than collecting garbages in DB.

0 Kudos

Ok, I understand your problem. And, trusting Reg's answer, I'm afraid your only options are to go through it or to stop and restart replication. BTW, are you using the default message size? Depending on message type and infrastructure, you're probably better off by massively (1 or 2 orders of magnitude) increasing it.

Baron
Participant
0 Kudos

Stop and restart replication will from one side solve this particular problem, but from the other side, will mean that I should go in all the 100 remotes and search for the necessary changes, and then apply them manually on Cons.!

VolkerBarth
Contributor
0 Kudos

Have you considered to re-extract the remotes after the publication has been changed?