dmshowlogdependency - Show Log Dependency
Use this command to display information about source database logs in order to implement a log retention policy.
You can display the following information
for a specified instance of CDC Replication,
you can display:
- A list of all the logs that are required for the specified instance.
- The earliest open transaction in the log for the specified instance.
- The logs which contain the position confirmed by the target database for the specified instance.
- The logs which contain the position the specified instance is reading from.
You must issue this command on your CDC Replication source system.
Syntax
dmshowlogdependency [-I <name>] ( -p <partition number> | -t | -l) [-c]
(-s <subscription> | -A | -a) [-v] [-L <locale>]
Parameters
- [-I <name>]
- The name of the CDC Replication instance. You can set the TSINSTANCE environment variable to the name of your CDC Replication instance. After this is complete, you no longer have to specify the instance when issuing commands.
- -p <partition number>
- Specify an integer for the partition number for which you want to display the complete list of required source database logs for the specified instance. These logs are required to start replication and contain data that has not been applied to the target.
- -t
- Displays the source database log which contains the position confirmed by the target database. If you specify -A, the command considers all subscriptions and displays the oldest log. If you specify -s, the command displays the log for the specified subscription. If you decide to use -a, then the command displays one log for each subscription. Each log contains the position confirmed by the target database for the corresponding subscription.
- -l
- Displays the source database log which contains the position CDC Replication is reading from. If you specify -A, the command considers all subscriptions and displays the oldest log. If you specify -s, the command displays the log for the specified subscription. If you decide to use-a, then the command displays one log for each subscription. Each log contains the position for the corresponding subscription.
- [-c]
- Considers the current position instead of the restart position.
- -s <subscription>
- Displays a source database log or a list of logs for the specified subscription.
- -A
- Displays a source database log or a list of logs for all subscriptions.
- -a
- Displays a source database log or a list of logs for each individual subscription.
- [-v]
- Specifies verbose output (otherwise, the output is formatted for scripting).
- [-L <locale>]
- The name of the locale used for the CDC Replication instance. The default is your machine's locale.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails. The command can also print as NULL if there are no tables defined in the subscription.
Examples
dmshowlogdependency
-I MYINSTANCE -A -t
Displays the complete list of required source database logs for all subscriptions in the specified instance.
dmshowlogdependency
-I MYINSTANCE -p 1 -s MYSUBSCRIPTION
Displays the complete list of database logs that are required on partition 1 in your DPF source environment for the specified instance and subscription.