create replication definition and alter replication definition commands allow you to mark quoted identifiers using the new parameter quoted. When an identifier is marked and the dsi_quoted_identifier is set to on, the replicate servers that subscribe to the replication definition receives the marked identifier as a quoted identifier. If the dsi_quoted_identifier is off, the markings are ignored and the replicate server does not receive quoted identifiers.
The modified create replication definition syntax is:
create replication definition replication_definition
with primary at data_server.database
[with all tables named [table_owner.] 'table_name' [quoted] |
[with primary table named [table_owner.]'table_name']
with replicate table named [table_owner.]'table_name'] [quoted]]
(column_name [as replicate_column_name] [datatype [null | not null]
[map to published_datatype]] [quoted]
[, column_name [as replicate_column_name]
[datatype [null | not null] computed]
[map to published_datatype]] [quoted]...)
primary key (column_name [, column_name]...)
[searchable columns (column_name [, column_name]...)]
[send standby [{all | replication definition} columns]]
[replicate {minimal | all} columns]
[replicate_if_changed (column_name [, column_name]...)]
[always_replicate (column_name [, column_name]...)]
[with dynamic sql | without dynamic sql]
For example, to create a table foo with column foo_col1 as a quoted identifier, enter:
create replication definition repdef with primary at primaryDS.primaryDB with all tables named “foo” (“foo_col1” int quoted, “foo_col2” int) primary key (“foo_col1”)
The modified alter replication definition syntax is:
alter replication definition replication_definition
{with replicate table named table_owner.]'table_name' |
add column_name [as replicate_column_name]
[datatype [null | not null]]
[map to published_datatype] [quoted],... |
alter columns with column_name
[as replicate_column_name] [quoted | not quoted],...|
alter columns with column_name
datatype [null | not null]
[map to published_datatype],...|
alter columns column_name {quoted | not quoted}
add primary key column_name [, column_name]... |
drop primary key column_name [, column_name]... |
add searchable columns column_name [, column_name]... |
drop searchable columns column_name [, column_name]... |
send standby [off | {all | replication definition} columns] |
replicate {minimal | all} columns |
replicate_if_changed column_name [, column_name]... |
always_replicate column_name [, column_name]...} |
{with | without} dynamic sql
alter replicate table name {quoted | not quoted}
For example, to mark as quoted the table named foo, enter:
alter replication definition repdef alter replicate table name “foo” quoted
To unmark the column foo_col1, enter:
alter replication definition repdef with replicate table named “foo” alter columns “foo_col1” not quoted
When replicating to a warm standby database and to replication definition
subscribers, and the primary table name is marked as quoted but
the replicate table name is not, or vice-versa, Replication Server
sends both the primary table name and the replicate table name as
quoted.