The user wants to replicate a table defined by the following DDL:
CREATE TABLE sampletable
( col1 INT
, col2 INT
, xml1 XMLTYPE
, xml2 XMLTYPE);
The user manually creates a replication definition on Replication Server using the following RCL:
create replication definition ra$xxx_sampletable
with primary at myprimary.pdb
with all tables named sampletable (
col1 int,
col2 int,
xml1 as SYS_NC00004$ text,
xml2 as SYS_NC00006$ text )
primary key (col1, col2)
go
If the Replication Agent pdb_auto_create_repdefs configuration parameter
is set to true, a replication definition will
be created automatically.
The user then marks the table for replication:
pdb_setreptable sampletable, mark
Because of the hidden CLOB columns, replication must be enabled for the table using pdb_setrepcol:
pdb_setrepcol sampletable, enable
The user creates a corresponding table at the replicate Oracle database:
CREATE TABLE sampletable
( col1 INT
, col2 INT
, xml1 XMLTYPE
, xml2 XMLTYPE);
If DDL replication has been enabled, it is unnecessary
to create the replicate table manually.