Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products

PowerProtect Data Manager 19.9 Microsoft Application Agent SQL Server User Guide

PDF

Optional parameters for the ddbmsqlrc command

You can use the following optional parameters with the ddbmsqlrc command.

-a "NSR_DFA_SI_DD_LOCKBOX_PATH=<full_path_to_lockbox>"
Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.
-t "<backup_time_stamp>"
Specifies the backup time stamp that you want to restore.
-a "NSR_ENABLE_FC={TRUE | FALSE}"
Enables database restoration to the DD server through Fibre Channel. The default value is FALSE.
-a "NSR_FC_HOSTNAME=<DD_Fibre_Channel_server_name>"
Specifies the hostname of the Fibre Channel.
-a "FLAT_FILE_RECOVERY={TRUE | FALSE}"
Performs a flat file restore to files, that is, restores a save set that has a full backup and multiple transaction log and differential backups to files.

To know the order in which multiple transaction log backup files are restored, use the save times that are present in the filenames.

The default value is FALSE.

-a "FLAT_FILE_RECOVERY_DIR=<folder_path>"
Specifies the folder, in which the flat file restore files are generated.

You can see the generated files in the <flat_file_recovery_folder>\<client_name>\<sql_instance_name> location.

-a "DDBOOST_COMPRESSED_RESTORE={TRUE | FALSE}"
Compresses the restore contents and transports them from the DD Replicator to the application host. This option saves network bandwidth.

The default value is FALSE.

-a "RESTORE_START_TIME=<start_date_and_time>"
Restores all the backups that were performed at or after a specified backup time (start date and time) and up to the backup time of the selected save set, that is, -t <Last_Backup_Time_Stamp>.

Specify the start date and time in the <mm>/<dd>/<yyyy> <hr>:<mins>:<secs> {AM | PM} format.

The start date and time must not be after the backup time of the selected save set, that is, -t <Last_Backup_Time_Stamp>.

-a "RESTORE_TO_SOURCE_PATH=TRUE"
Ensures that the backup is restored to the original source path by default. The -a "RESTORE_TO_SOURCE_PATH=TRUE" option is overridden if the -C or -H relocation options are used.
-a "CLOSE_SQL_CONNECTIONS={TRUE | FALSE}”
Specifies whether to enable exclusive access to the target database by changing the database to single user mode during the restore operation to ensure a successful recovery.
-$ <instance>
Specifies the target SQL Server instance that contains the target databases that you want to restore. The default value is the instance where the backup was taken.
Type the value in one of the following formats:
  • For the default instance, type MSSQL
  • For a named instance, type MSSQL$<instance_name>
-d <destination_database>
Specifies the target database, to which you want to restore the backup.
Type the value in one of the following formats:
  • <destination_database_name>
  • MSSQL:<destination_database_name>
  • MSSQL$<instance_name>:<destination_database_name>
-C file=path,file2=path2,...
Relocates the database files (.mdf, .ndf, and .ldf) to a different folder.
You cannot use the -C parameter and the -H parameter in the same operation.
-H " '<source_path>';'<destination_path>'"
Relocates file paths and all files contained in a path to a different location during a restore operation.

The -H command option can be used to relocate multiple file paths in the same command line.

The -H option is supported on standard and redirected restores, which includes the following:

  • Normal restore—Same server and same instance.
  • Different instance restore—Same server and different instance.
  • Restore to different database file.
  • Different server restore.

To relocate individual files, see the table entry for the -C option.

You cannot use the -C option and the -H option in the same operation.
-f
Overwrites the existing database with the current database that you restore if the names of both the databases are same.
-q
Displays ddbmsqlsv messages in the quiet mode, that is, the option displays summary information and error messages only.
-k
Specifies to perform a checksum before restoring the data.
-u
Specifies to perform a checksum before the restore operation but to proceed with the operation even in the case of errors.
-D <debug_level_1_through_9>
Generates detailed logs that you can use to troubleshoot backup issues. The default value is 0 (zero).
-a "DELETE_DEBUG_LOG_DAYS=<days>"
Specifies to delete debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.
This parameter only deletes debug logs named in the default format and located in the logs folder at <installation_path>\MSAPPAGENT\logs.
-V
Verifies whether the restore process meets the following requirements:
  • The backup set that you want to restore is complete and all volumes are readable
  • Header fields, such as database page IDs, are ready to write data
  • Whether the backup was performed by using the checksum option
  • Whether the destination host has sufficient space to restore data
-l incr
Restores from the last transaction log backup.

When you use the -l incr option, you must restore the backup chain in order. For example, consider the following backup history:

  • A full backup taken at 1:31:49PM
  • A logs only backup taken at 1:32:42PM
  • A logs only backup taken at 1:34:03PM
  • A logs only backup taken at 1:34:50PM

To restore this backup chain, perform the following steps:

  1. Type the following command to restore up to the second last transaction log backup:
    ddbmsqlrc.exe -a NSR_DFA_SI_DD_HOST=10.34.156.120 -a NSR_DFA_SI_DD_USER=ost -a NSR_DFA_SI_DEVICE_PATH=/msappstu4 -a NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common\lockbox -c mars-jupiter.planets.com -a SKIP_CLIENT_RESOLUTION=TRUE -f -t 09/06/2017 01:34:03 PM -S norecover MSSQL$TESTDB02:info3 
  2. Type the following command to restore the last transaction log backup with -l incr:
    ddbmsqlrc.exe -a NSR_DFA_SI_DD_HOST=10.34.156.120 -a NSR_DFA_SI_DD_USER=ost -a NSR_DFA_SI_DEVICE_PATH=/msappstu4 -a NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common\lockbox -c mars-jupiter.planets.com -a SKIP_CLIENT_RESOLUTION=TRUE -f -l incr -S normal MSSQL$TESTDB02:info3 
-O "<option1>, <option2>, ..."
Specifies advanced recovery options. Separate each option with a comma.

The following table describes the advanced recovery options that are available:

  • BUFFERCOUNT=<number>: Specifies the total number of IO buffers that can be used during a recovery operation.
  • KEEP_CDC: Enables change data capture (CDC) recovery.
  • KEEP_REPLICATION: Preserves the replication when you recover a published database. This option is required if a database was replicated when the backup was created.
  • READ_WRITE_FILEGROUPS: Recovers only the read/write (active) filegroups from the backup. This option can only be used to recover backups performed with the READ_WRITE_FILEGROUPS option. You cannot specify filegroup or file-level recover targets with the READ_WRITE_FILEGROUPS option.

    If you are relocating multiple filegroups during the restore, you can use the -H option for global relocation.

    After you restore a backup with the READ_WRITE_FILEGROUPS option, any read-only filegroups in the database will enter the recovery pending state and the rest of the filegroups will go online.

    There are two different scenarios to recover cumulative incremental READ_WRITE_FILEGROUPS backups:

    • If you have taken a full READ_WRITE_FILEGROUPS backup prior to the cumulative incremental backup, the Microsoft application agent will chain together the two backups in the correct order and complete the restore.
    • If you have not taken a full READ_WRITE_FILEGROUPS backup but want to use a normal full backup as the differential base for the cumulative incremental READ_WRITE_FILEGROUPS backup, you must first restore the full backup normally and leave the database in no recovery mode, and then apply the READ_WRITE_FILEGROUPS differential backup with the -z option.
-z
Enables implementation of a recovery plan in independent command line operations. Normally the Microsoft application agent builds the recovery plan, ensuring that all the required backups are available and that they run in the proper order and with the proper options. The -z option removes safety checks.

This option is used in more complex recoveries. The following example commands use the following backup history:

  • savetime 1:00 - full backup
  • savetime 2:00 - txnlog backup
  • savetime 3:00 - txnlog backup

To recover multiple backups and restore a database in a single command, run the following command:

ddbmsqlrc ... -t "savetime 3:00" ...

This command recovers the entire recovery chain, from the first full backup to the last logs-only backup.

To recover this recovery chain and restore a database in a series of independent commands, run the following commands:

ddbmsqlrc ... -z -S norecover -t "savetime 1:00" ...
ddbmsqlrc ... -z -S norecover -t "savetime 2:00" ...
ddbmsqlrc ... -z -S normal -t "savetime 3:00" ...

These three commands recover each backup individually.

The -z option disables building the recovery plan and recovers only the specified backup. This command is required for all backups except for level full backups.

Use the -S norecover option with the -z option to prepare the database for more restores. This command is required for all except the last recovery command. The final command recovers the last logs-only backup and brings the database online.

NOTE A point-in-time restore within the final txnlog can be specified by replacing the save time. For instance, in the previous example, you can replace 3:00 with 2:45. The database is not available for general use until after the final recovery completes. Any missing, incorrect, or out-of-order save times result in SQL Server reporting errors.

Starting with Microsoft application agent 19.2, you can specify the ddbmsqlrc command option -S norecover when you restore a read-write (active) filegroup, which leaves the database in the recovering mode. In this mode, you can then apply subsequent transaction logs to complete a point-in-time restore of the active filegroup, for example, when backups are configured as in the following example. The following example commands use the following backup history:

  • savetime 6/21/2019 12:10:35 PM - full read/write filegroup backup with -O "READ_WRITE_FILEGROUPS" option
  • savetime 6/21/2019 12:21:30 PM - txnlog backup
  • savetime 6/21/2019 12:25:34 PM - txnlog backup

To perform a point-in-time restore of the active filegroup, run the following commands:

  1. Restore the filegroup backup in norecover mode:

    ddbmsqlrc ... -z -f -t "06/21/2019 12:10:35 PM" -S norecover -O "READ_WRITE_FILEGROUPS" ...
  2. Restore the second last log backup in norecover mode:

    ddbmsqlrc ... -z -f -t "06/21/2019 12:21:30 PM" -S norecover ...
  3. Complete the point-in-time restore in normal mode to a time before the final log backup:

    ddbmsqlrc ... -z -f -t "06/21/2019 12:25:34 PM" -S normal ...

  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\