create database replication definition

Description

Creates a replication definition for replicating a database or a database object.

Syntax

create database replication definition db_repdef
           with primary at server_name.db
           [ [ not ] replicate DDL ]
           [ [ not ] replicate setname setcont ]
           [ [ not ] replicate setname setcont ]
           [ [ not ] replicate setname setcont ]
           [ [ not ] replicate setname setcont ]
setname  ::= { tables | functions | transactions | system procedures }	
setcont  ::= [ in ( [ owner1.]name1 [, [owner2.]name2 [, ... ] ] ) ]

Parameters

db_repdef

Name of the database replication definition.

server_name.db

Name of the primary server/database combination. For example: TOKYO.dbase.

[ not ] replicate DDL

Tells Replication Server whether or not to send DDL to subscribing databases. If “replicate DDL” is not included, or the clause includes “not,” DDL is not sent to the replicate database.

[ not ] replicate setname setcont

Tells Replication Server whether or not to send objects in the setname category to the replicate database.

If you omit the system procedures setname or include the not option, Replication Server does not replicate the system procedures.

If you omit replicate tables, functions, or transactions setname or include the not option, Replication Server replicates all objects of the setname category.

owner

An owner of a table or a user who executes a transaction. Replication Server does not process owner information for functions or system procedures.

You can replace owner with a space surrounded by single quotes or with an asterisk.

name

The name of a table, function, transaction, or system procedure.

You can replace name with a space surrounded by single quotes or with an asterisk.

Examples

Example 1

Creates a database replication definition rep_1B. This database replication definition specifies that only tables employee and employee_address are replicated:

create database replication definition rep_1B
  with primary at PDS.pdb
  replicate tables in (employee, employee_address)

Example 2

Creates a database replication definition rep_2. In this example, the database my_db is replicated, DDL is replicated, but system procedures are not replicated:

create database replication definition rep_2
  with primary at dsA.my_db
  replicate DDL
  not replicate system procedures

Usage


Owner information

See also

alter database replication definition, drop database replication definition