cdr define server
The cdr define server command defines a replication server in an Enterprise Replication domain. You can add a replication server to an existing domain or create a new domain.
Syntax
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
server_group | Name of a database server group to add to an Enterprise Replication domain. | Must be the name of an existing database server group in the sqlhosts information. | |
sync_server | Name of a replication server that is a member of the domain into which you are adding a server. | Must be an existing replication server. The server must be online. | Long Identifiers |
The following table describes the options to cdr define server.
Long Form | Short Form | Meaning |
---|---|---|
--init | -I | Adds server_group to the replication domain. |
--leaf | -L | Defines the server as a leaf server in an existing domain. The server that is specified by the --sync option becomes the parent of the leaf server. |
--nonroot | -N | Defines the server as a nonroot server in an existing domain. The server that is specified by the --sync option becomes the parent of the nonroot server. |
--sync= | -S | Adds a server to the existing domain of which the sync_server is a member. Uses the global catalog on sync_server as the template for the global catalog on the new replication server, server_group. For Hierarchical Routing topologies, Enterprise Replication also uses the sync_server as the parent of the new server in the current topology. |
Dynamic Options
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
ats_dir | Name of the directory for Aborted Transaction Spooling files. The default is /tmp. | Must be a full path name. The path for the directory
can be no longer than 256 bytes. A value of /dev/null (UNIX™) or NUL (Windows™) prevents ATS file generation. |
Follows naming conventions on your operating system |
ris_dir | Name of the directory for Row Information Spooling files. The default is /tmp. | Must be a full path name. The path for the directory
can be no longer than 256 characters. A value of /dev/null (UNIX) or NUL (Windows) prevents RIS file generation. |
Follows naming conventions on your operating system |
timeout | Idle timeout for this replication server. | Default value of 0 indicates no timeout. Must be an integer number of minutes. The maximum value is 32767. | Integer |
The following table describes the options to cdr define server that you can change with the cdr modify server command while replication is active.
Long Form | Short Form | Meaning |
---|---|---|
--ats= | -A | Specifies the directory to store aborted transaction spooling files for replicate transactions that fail to be applied. |
--atsrisformat= | -X | Specifies the format of ATS and RIS files:
If you omit the --atsrisformat= option, ATS and RIS files are created in text format. |
--ris= | -R | Specifies the directory to store row information spooling files for replicate row data that fails conflict resolution or encounters replication-order problems. |
--idle= | -i | The default value is 0 . Set the
number of minutes after which an inactive connection is closed after timeout minutes.
If timeout is 0 , the connection does not time out. |
Usage
Run the cdr define server command on the database server that you want to define as a replication server. To create the replication server in an existing domain, specify a synchronization server that belongs to that domain with the --sync= option. To create a replication server in a new domain, omit the --sync= option. The cdr define server command creates the Enterprise Replication global catalog on the specified server.
- Creates an sbspace and a dbspace from chunks from the storage pool. The spaces have the same characteristics and storage-pool behavior as other spaces created from the storage pool. The storage pool must have at least 500 MB of free space for the sbspace and 200 MB of free space for the dbspace. These spaces must be composed of chunks of size 100 MB or greater.
- Sets the values of the CDR_QDATA_SBSPACE and CDR_DBSPACE configuration parameters to the space names both in memory and in the onconfig file.
- Shows the names of the spaces that are created.
You can run this command from within an SQL statement by using the SQL administration API.
The maximum number of replication servers that you can define is 32767.
Examples
- Connect to the database server stan.
- Initialize Enterprise Replication.
- Set the /cdr/ats directory for generated ATS files.
- Set the /cdr/ris directory for generated RIS files.
- Set the format of ATS and RIS files to text.
cdr define server --connect=stan \
--ats=/cdr/ats --ris=/cdr/ris \
--atsrisformat=text --init g_stan
- Connect to the database server oliver.
- Initialize Enterprise Replication.
- Synchronize the catalogs on database server oliver with the catalogs on database server stan.
- Set the /cdr/ats directory for generated ATS files.
- Specify that RIS files are not generated.
- Set the file format of ATS files to XML.
cdr define server -c oliver \
-A /cdr/ats -R /dev/null -X xml \
-S g_stan -I g_oliver