Name

REPL_UNSUBSCRIBE — drop subscription

Synopsis

REPL_UNSUBSCRIBE ( in server_name varchar ,
  in publication varchar ,
  in item varchar );
 

Description

This function is used to stop receiving a replication messages from a publisher server for a item or whole subscription. It will be invoked automatically when a publication is dropped. The subscriber can also invoke this function to stop receiving replication messages. The existing items can be dropped or not depending on the copy mode flag. The description entries for that subscription will be removed. There is no "undo" ability. To temporally halt the replication messages you can use repl_disconnect().

Parameters

server_name

Name of the target publishing server.

publication

The name of the publication.

item

The item to removed. NULL can be supplied to remove all items.

Example

Example 24.339. Unsubscribing from a publication.

This is to stop replication on subscription 'demo-publication' from publisher server 'demo-srv'.

SQL> DB.DBA.REPL_UNSUBSCRIBE ('demo-srv', 'demo-publication', NULL);