cdr argument: Administer Enterprise Replication (SQL administration API)

Use the cdr argument with the admin() or task() function to administer Enterprise Replication.

Syntax

(1)
Notes:
  • 1 Maximum of six option arguments.
Element Description Key Considerations
command_name The name of a cdr command. You cannot include any hyphens, flags, or other constraining options to command_name that the cdr command-line utility requires. You cannot use abbreviations.
option_name One or more elements of the cdr command-line options to the command_name. The elements must be delimited by quotation marks. Also, include (in the correct order) any hyphens, flags, or other elements of cdr command-line options that the command_name requires. You can use abbreviations.

Usage

Use these functions to produce the same effect as with the cdr command-line utility to manage Enterprise Replication.

The SQL administration API supports cdr commands used to administer Enterprise Replication. The following commands for monitoring Enterprise Replication are not supported:

  • cdr list grid
  • cdr list replicate
  • cdr list replicateset
  • cdr list server
  • cdr list template
  • cdr stats recv
  • cdr stats rqm
  • cdr -V
  • cdr view

The first argument must include only the cdr command names exactly as specified in the appendix for the cdr utility in the HCL OneDB™ Enterprise Replication Guide, such as cdr define server. Command names are case-sensitive and abbreviations (such as cdr sto replset instead of cdr stop replicateset) are not supported. The SQL administration API does not perform any validation before passing the parameters to the cdr utility.

The second and any following arguments include the command options. The options can be specified in one or up to six arguments.

The following example illustrates the use of the SQL administration API to define an Enterprise Replication server:
EXECUTE FUNCTION task ( 'cdr define server', '--connect=g_amsterdam 
	--ats=/local0/er/ats --ris=/local0/er/ris --init g_amsterdam' );
The following example shows how the options can be spread over several arguments; the above statement can also be written as:
EXECUTE FUNCTION task( 'cdr define server',
			'--connect=g_amsterdam',
			'--ats=/local0/er/ats',
			'--ris=/local0/er/ris',
			'--init g_amsterdam' ); 

The following example shows double quoted strings within an argument:

EXECUTE FUNCTION task('cdr change replicate', 
'-d repl_1 -"db1@server1:antonio.table1" "db2@server2:carlo.table2"');