Changes an existing database replication definition.
alter database replication definition db_repdef with primary at data_server.database [alter owner from current_table_owner to new _table_owner [for table_name]] | [not] replicate DDL | [not] replicate setname setcont | [not] replicate [{SQLDML | DML_options} [in table_list]} [with dsi_suspended]
setname ::= {tables | functions | transactions | system procedures}
setcont ::= [in ([owner1.] name1 [, [owner2.] name2 [, ...]])
Include the for tablename option to specify for which you want to transfer ownership. Omit for tablename if you want to change the owners for all tables in the setname category in the database replication definition.
If you omit the system procedures setname or include the not option, Replication Server does not replicate the system procedures.
If you omit tables, functions, or transactions setname or include the not option, Replication Server replicates all objects of the setname category.
The filter category specified by setname replaces the current filter category or adds the filter category to the database replication filters, if it is a new category.
When the database replication mode is set to any combination of UDIS, the RepAgent sends both individual log records and the information needed by Replication Server to build the SQL statement.
alter database replication definition rep_1C with primary at PDS.pdb not replicate tables in (table2) with dsi_suspended
alter database replication definition dbrepdef with primary at ds1.pdb1 replicate 'UD' in (tb1,tb2) go
exec rs_send_repserver_cmd 'alter database replication definition authors_dbrepdef with primary at NY_DS.pdb1 alter owner from mario to angela for author_name'
When alter database replication definition is executed, Replication Server writes an rs_marker to the inbound queue. alter database replication definition does not take affect until the marker reaches the DIST, which gives the DIST time to incorporate the changes in the Database Subscription Resolution Engine (DSRE).Replication Server creates a new version of the replication definition to synchronize the data in the queue with the active replication definition
Altering a database replication definition may desynchronize the primary and replication databases. See the Replication Server Administration Guide Volume 1 for instructions for resynchronizing databases.
If you do not specify a filter in your replication definition, the default is the not replicate clause. Apply alter database replication definition to change the SQLDML filters. You can either specify one or multiple SQLDML filters in a replicate clause.
For more information about SQL statement replication see create database replication definition.