Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

SmSqlBi syntax

Name  Top

SmSqlBi--Command for accessing SnapManager backup functionality.

Description  Top

This command enables you to initiate a backup or verification job, with all of the options available through the Backup Wizard or Backup and Verification tab in the SnapManager graphical user interface. This feature enables you to create scripts to invoke SnapManager functionality without having to use the SnapManager graphical user interface.

Synopsis  Top

SmSqlBi -H SqlServerHostName [-U UserName -P Password]
-S Instance -C NumberOfDatabases DatabaseNameList
[-S Instance -C NumberOfDatabases DatabaseNameList] [OptionsList]

Required parameters  Top

The following parameters are required.

Switch

Description

-H

You must use the following option to specify the SQL Server computer on which the SQL Server instances reside:

-H SqlServerHostName [-U UserName -P Password]

SqlServerHostName is the host name of the computer on which the SQL Server instances are running.

UserName is the SQL Server account name (specified if the SQL Server computer is accessed using a different account from that used to access the production SQL Server).

Password is the SQL Server account password (specified if the SQL Server computer is accessed using a different account from that used to access the production SQL Server).

-S

You must use the following option to specify the databases or transaction logs you want to back up or verify:

-S Instance -C NumberOfDatabases [DatabaseList]

Instance is the host name of the SQL Server instance that owns the databases or transaction logs you want to back up or verify.

NumberOfDatabases is the number of databases to be backed up or verified. If you specify 0, then all databases that have valid configurations in that SQL Server instance will be backed up or verified and the database Snapshot names do not need to be specified.

DatabaseNameList is the list of database Snapshot copy names. The names are separated by single spaces. Specify this list only if you are selecting specific databases in the SQL Server instance (that is, if you are specifying a value greater than zero for the parameter NumberOfDatabases).

Note
Repeat this option as many times as needed to specify all databases or transaction logs you want to back up or verify.

Optional parameters  Top

The OptionsList shown in the synopsis for this command consists of any valid combination of the following parameters.

Option

Description

-A

If the operation includes database or transaction log verification, use this option if you want to specify that the databases are to be attached after the verification finishes.

-All

If the operation includes database or transaction log verification, use this option if you want to specify that the operation is to include all backup management groups (Daily and Weekly). Compare with the -Daily and -Weekly options.

-D

If the operation includes database or transaction log backup, use the following option if you want to delete the oldest database backups or transaction log backups:

-D NumberOfBackups

NumberOfBackups is the number of database backups or transaction log backups to be retained after the oldest backups are deleted.

-Daily

If the operation includes database or transaction log verification, use this option if you want to specify that you only want to verify the backups assigned to the Daily backup management group. Compare with the -Weekly, and -All options.

-G

If the operation is full database backup, use this option if you want to specify that you also want the transaction logs to be backed up after the database backups finish.

Note
If you want to back up transaction logs only, use the -L option instead.

-J

If the operation is a backup of the transaction log only (that is, if the -L option is specified), use this option if you want to create a Snapshot copy of the SnapInfo directory after the backup finishes.

If you use this option with an operation that includes transaction log backup, you can also use the -K option (delete the oldest SnapInfo directory Snapshot copies).

-K

If the operation is a backup of the transaction log only (that is, if the -L option is specified), use the following option if you want to delete the oldest SnapInfo directory Snapshot copies:

-K NumberOfSnapInfoSnapshotsToKeep

NumberOfSnapInfoSnapshotsToKeep is the number of SnapInfo directory Snapshot copies to keep.

This option is not valid unless you also specify the -J option (create a Snapshot copy of the SnapInfo directory after the backup finishes).

-L

If you want to perform only a transaction log backup, use this option.

Note
If you want to perform a full database backup followed immediately by a transaction log backup, use the -G option instead.

-M

If you want to perform only verification of the most recent unverified backup Snapshot copies (no database or transaction log backup), use the following option:

-M NumberOfBackupSnapshotsToVerify

NumberOfBackupSnapshotsToVerify is the number of backup Snapshot copies you want to verify.

If you want to perform a transaction log only backup followed by a backup verification, use the -L option (back up transaction log only) instead. To include backup verification as part of a backup, use the -Daily, -Weekly, or -All option; do not use the -M option.

If you want to perform a full database backup (with or without a transaction log backup) followed by a backup verification, do not use either the -L option or the -M option. To include backup verification as part of a backup, use the -Daily, -Weekly, or -All option; do not use the -M option.

-N

If the operation includes database or transaction log verification, use this option if you do not want the Snapshot copies verified after the backups finish.

Note
When performing a backup from the command-line using SmSqlBi, the default behavior is to verify Snapshot copies after the backup finishes; the -N option can be used to disable this. Conversely, when performing a backup using the Backup Wizard or the Backup and Verification tab in the SnapManager graphical user interface, verification of backups is not performed unless the "Verify Snapshot after backup (run DBCC)" option is enabled.

-O

If the operation is a backup of the transaction log only (that is, if the -L option is specified), use this option if you want to remove inactive entries from the transaction logs.

-Q

If the operation includes database or transaction log verification, use this option if you want to specify that a different SQL Server be used to run the DBCC utility:

-Q VerificationServer [-I UserName -W Password]

VerificationServer is the host name of the verification server.

UserName is the SQL Server account name (specified if the verification server is to be accessed using a different account from that used to access the production SQL Server).

Password is the SQL Server account password (specified if the verification server is to be accessed using a different account from that used to access the production SQL Server).

-mpdir

Use specified mount point directory.

Specify which mount point directory a Snapshot copy will be mounted to during database verification.

-mp

Mount Snapshot to a directory.

Mount snapshots in a default NTFS directory during database verification. This option is also effective when there are no available drive letters to mount snapshots.

-R

If the operation is a full database backup in which you will be deleting the oldest full database backups (that is, for a full database backup that includes the option -D NumberOfBackups), use this option if you want to retain up-to-the-minute restore ability for older backups in other management groups.

-Recent

If the operation includes database backup, use this option if you want the database backup Snapshot copies and SnapInfo backup Snapshot copies to be named using the generic naming convention. If you do not use this option, unique naming convention (timestamped) is used. For more information, see SnapManager Snapshot naming conventions.

-RS

If you want to run a command after the operation finishes, use the following option:

-RS RCServer -RP CommandPath -RA ArgumentList

RCServer is the host name of the SQL Server on which the command is to be run.

CommandPath is the full path to the program or script that you want to run.

ArgumentList is the string of SnapManager operation-specific information to be passed to your program or script. For details, see Command arguments pass information to your program or script.

-UM

If the operation uses backups that reside on volumes configured as SnapMirror sources, use this option if you want to update the SnapMirror destination after the backup or verification operations finish.

-Weekly

If the operation includes database or transaction log verification, use this option if you want to specify that you only want to verify the backups assigned to the Weekly backup management group. Compare with the -Daily and -All options.

-X

If the operation includes database backup, use this option if you want to verify the live database before the backups are performed.

-Y

If the operation includes database backup, use this option if you want to verify the live database after the backups are performed.

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments