Changes an existing database replication definition. You can also add tables to the replication path and remove tables from the replication path. You can specify tables in line or in a file list.
alter database replication definition <db_repdef> with primary at <data_server>.<database> {[{not replicate DDL} | {replicate DDL [{with | without} {auto_update_table_list | auto_extend_table_list}]}] | [not] replicate <setname> <setcont> | [not] replicate {{SQLDML | DML_options} [in <table_list>]} | [alter owner from <current_table_owner> to <new_table_owner> [for <table_name>]] | [{add | remove} tables {setcont}]} [with dsi_suspended] [user <username> password <pass>] <setcont> ::= [[in] ([<owner1>.]<name1>[, [<owner2>.]<name2> [, ... ]])] | [in files ([<file1> [, <file2> [, ..]]])] <setname> ::= {tables | functions | transactions | system procedures}
The term functions in <setname> refers to user-defined stored procedures or user-defined functions.
Name of the database replication definition.
Informs Replication Server not to send DDL to subscribing databases.
Informs Replication Server to send DDL to subscribing databases and whether to update or extend the table list. If you specify replicate DDL without any option, DDL is sent to the replicate database, however, the table is not added to the replication path.
Sends DDL commands to the replicate database. If pdb_automark_tables is true for a table, the table is automatically updated in the table list when drop table or rename table DDL commands are encountered.
Sends DDL commands to the replicate database, but does not update the tables in the table list when drop table or rename table DDL commands are encountered.
Sends DDL commands to the replicate database. If pdb_automark_tables is true for a table, the table is automatically added to the table list when create table DDL commands are encountered.
Specifies whether to send objects stated in the <setname> category to the replicate database. The <setname> category can have a maximum of one clause each for tables, functions, transactions, and system procedures.
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> and do not 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.
Informs Replication Server whether to replicate SQL statements to tables defined in <table_list>.
U – update
D – delete
I –insert select
S – select into
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.
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.
Removes tables from the replication path.You can either specify a list of tables or provide the table names in a file.
Tells the replicate Replication Server to suspend the replicate DSI. Can be used to signal need to resynchronize databases.
An owner of a table or a user who executes a transaction. Replication Server does not process owner information for functions or system procedures.
A space (‘ ‘) – indicates no owner.
An asterisk (*) – indicates all owners. Thus, for example, <*.publisher> means all tables named <publisher>, regardless of owner.
The name of a table, function, transaction, or system procedure.
A space (‘ ‘) – indicates no name. For example, <maintuser.’ ‘> means all unnamed maintenance user transactions.
An asterisk (*) – indicates all names. Thus, for example, <robert.*> means all tables (or transactions) owned by <robert>.
The user ID and password used to connect to the primary Adaptive Server database or Replication Agent and select from the primary table.
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
alter database replication definition authors_dbrepdef with primary at NY_DS.pdb1 alter owner from mario to angela for author_name
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.
If a table is already defined as replicating in the database replication definition, nothing changes. Otherwise, this table is added to the replication path.
If a replicate site subscribes to a database replication definition, and the database subscription is created with the with materialization option, the table materializes automatically.
If multiple sites subscribe to a database replication definition, the table is not updated in the rs_dbsubsets table until all sites finish materialization.
When removing tables, if a table is defined as not replicating in the database replication definition, nothing changes. Otherwise, the table is removed from the replication path.
If multiple replicate sites subscribe to a database replication definition, changing the definition affects all of them. To avoid a global change, use a different database replication definition.