Verifies that Replication Server can successfully execute a replication definition request.
admin verify_repserver_cmd, ‘rs_api’
The string containing the Replication Command Language (RCL) command and all corresponding parameters you want to verify.
Enclose rs_api in single quotes, and replace each single quote inside the string with two single quotes:
In this example, admin verify_repserver_cmd tests if you can use alter replication definition to drop columns from a replication definition and suspend the target DSIs successfully after the data for the old replication definition version is replicated to a target, such as a standby or replicate database:
admin verify_repserver_cmd, ‘alter replication definition authors drop address, city, state, zip with DSI_suspended’
If Replication Server can execute the alter replication definition command, Replication Server returns with this message:
The replication definition command can be executed successfully.
This example shows what happens if you use admin verify_repserver_cmd to see whether you can drop columns from a replication definition that does not exist:
admin verify_repserver_cmd, ‘alter replication definition authors_does_not_exist drop address, city, state, zip’
Replication Server returns with a message that the replication definition named “authors_does_not_exist” does not exist.
This example shows that admin verify_repserver_cmd can detect syntax errors, such as using the “columns” keyword in the command line:
admin verify_repserver_cmd, ‘alter replication definition authors drop columns address, city, state, zip with DSI_suspended’
Replication Server returns with a message, such as:
Line 1, character 71: Incorrect syntax with the keyword 'columns'.
This example shows that admin verify_repserver_cmd can detect if you are using quotes incorrectly, such as using double quotes to enclose ‘off’:
admin verify_repserver_cmd, ‘alter replication definition authors replicate sqldml “off”’
Replication Server returns with a message, such as:
Line 1, Incorrect syntax with the keyword 'off'.
The correct syntax is:
admin verify_repserver_cmd, ‘alter replication definition authors replicate sqldml ‘‘off’’’
When Replication Agent sends a replication definition RCL to Replication Server to execute, and the replication definition RCL fails to execute, Replication Agent shuts down. To avoid this situation, use admin verify_repserver_cmd to verify that Replication Server can successfully execute a replication definition request before you execute the RCL directly from the primary database. Replication Server returns an error if it cannot successfully execute the request.
Replication Server supports admin verify_repserver_cmd for the same replication definition commands as rs_send_repserver_cmd:
alter replication definition
create replication definition
drop replication definition
alter applied function replication definition
create applied function replication definition
alter request function replication definition
create request function replication definition
Any user may execute this command.
admin verify_repserver_cmd, alter replication definition, rs_send_repserver_cmd, sysadmin skip_bad_repserver_cmd