dmshutdown - Shut down CDC Replication
Use this command to stop an instance of CDC Replication and end replication on all subscriptions that use the instance as a source.
This command is often used prior to taking a server or database offline for maintenance purposes or upgrading CDC Replication.
To end replication on subscriptions that use the specified instance, you can use the –a parameter which will generate an error when forcefully ending replication on subscriptions that use the instance as a target.
If this command does not end CDC Replication processes and stop the specified instance, use the dmterminate command on the UNIX and Linux® platforms to force a complete shut down.
Syntax
dmshutdown [-I <name>] [-c|-i|-a] [-L <locale>]Parameters
- [-I <name>]
- Specifies the name of the CDC Replication instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
- [-c]
- Specifies that CDC Replication stops the specified instance with the Normal option. CDC Replication will use this option by default if you do not specify -i or -a. The instance will only stop if no subscriptions are currently running.
- [-i]
- Specifies that CDC Replication stops the specified instance with the Immediate option. The instance will only stop if no subscriptions are currently running.
- [-a]
- Specifies that CDC Replication stops the specified instance and ends replication on all subscriptions that use the instance with the Abort option. Subscriptions that use the specified instance will end replication with an error.
- [-L <locale>]
- The name of the locale used for the CDC Replication instance. The default is the locale of the machine where CDC Replication is installed.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmshutdown
-I MYINSTANCE -cStops the specified instance with the Normal option. The instance will only stop if no subscriptions are currently running.
dmshutdown -I MYINSTANCE –aStops the specified instance and ends replication with the Abort option for all subscriptions that use the instance. Subscriptions that use the specified instance will end replication with an error.