Replicating DDL changes (replicateddl) v7
The replicateddl
command applies an ALTER TABLE
statement to a publication table in all databases of a replication system. It also updates the Replication Server insert/update/delete triggers and shadow table associated with that publication table.
Synopsis
-replicateddl pubname -repsvrfile pubsvrfile -table schema_t.table_name -ddlscriptfile script_file
See Replicating DDL changes for more information.
Parameters
pubname
The name of the publication containing the table to which to apply the ALTER TABLE
statement.
pubsvrfile
The file containing the publication server login information.
schema_t
The name of the schema containing table_name
. This value is case sensitive.
table_name
The name of the table in the ALTER TABLE
statement whose definition to modify. This value is case sensitive.
script_file
Path to the file containing the ALTER TABLE
statements.
Examples
This example shows the addition of a column named title
to table edb.emp. The ALTER TABLE
statement is in the text file addcolumn.sql
.
ALTER TABLE edb.emp ADD COLUMN title VARCHAR(20); The replicateddl command is executed using the addcolumn.sql file to update the triggers and shadow tables on the primary nodes: $ java -jar edb-repcli.jar -replicateddl emp_pub \ > -repsvrfile ~/pubsvrfile.prop \ > -table edb.emp \ > -ddlscriptfile ~/addcolumn.sql DDL changes successfully replicated to all primary nodes.
- On this page
- Synopsis
- Parameters
- Examples