Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to avoid 'delete transaction' replication?

24 views
Skip to first unread message

ca...@my-dejanews.com

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to
Hello,

I would like to (asynchronously) replicate primary Sybase database "A" into
read-only replica "B".

The "B" database should contain all records, which were ever entered into "A"
database. The "A" database will hold only a subset of records i.e. will be
cleaned-up time to time.

How do I configure Sybase v11 replication server to transfer just "insert" or
"update" transactions, but NOT "delete" transactions? That means any delete
operation performed on database "A", must NOT be propagated to database "B".
Any other transaction like "insert" or "update" should be propagated into "B"
database normaly.

Thank you for any useful hint...

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

william....@reuters.com

unread,
Mar 31, 1999, 3:00:00 AM3/31/99
to
In article <7dobpf$fb9$1...@nnrp1.dejanews.com>,

hello,

You need to create a new function string class and rewrite the delete
function strings for all your tables to do nothing. You didn't specify which
version of Replication Server you are using. In version 11.5 it is easier
because you only need to redefine the rs_delete functions and inherit
everything else from the default function string class. In 11.0 you must
redefine the rs_update and rs_insert function strings to be what they are in
the default function string class. To do this in 11.5, create a new function
string class no_delete_function_class.

1> create function string class no_delete_function_class
2> set parent to rs_default_function_class
3> go

Each table contains an rs_delete function string and you must override the
default for each table where you do not want to replicate a delete. To alter
the delete function string for mytable with replication definition
mytable_repdef to not replicate:

1> create function string mytable_repdef.rs_delete
2> for no_delete_function_class
3> output language ''
4> go

To enable the no_delete_function class for the DSI connection to your
replicate database 'mydb' on server 'myserver', first suspend the connection:

1> suspend connection to myserver.mydb
2> go

Now alter the connection to use the new function string class:

1> alter connection to myserver.mydb
2> set function string class no_delete_function_class
3> go

Now resume the connection
1> resume connection to myserver.mydb
2> go

If you are using 11.0, you must redine the rs_insert and rs_delete function
strings to the default. You need not know what the defaults are, just omit
the output clause as follows:

1> create function string mytable_repdef.rs_insert
2> for no_delete_function_class
3> go

1> create function string mytable_repdef.rs_update
2> for no_delete_function_class
3> go

Good Luck, Bill

0 new messages