SQL Safe provides you with a command line interface (CLI) that allows you to make changes to your SQL Safe configurations across multiple SQL Server instances in a few lines of text and saving you time.
About Command Line Interface (CLI)
A Command Line Interface (CLI) is a user interface that allows you to interact with the operating system through commands where you type an specified command and the operating system prompts.
Make sure you know the proper command format for each action you want to perform.
SQL Safe CLI Usage
The following table describes the SQL Safe CLI usage:
Usage | Description |
---|---|
SQLsafeCmd <action> [options] | Perform an action. |
SQLsafeCmd help <action> | Display detailed help for an action. |
SQLsafeCmd -ArgsFile <filename> | Perform the action defined within an argument file. |
where:
Action | Description |
---|---|
<action> | A keyword that tells SQLsafe what to do. |
<filename> | Specifies the file that contains command line arguments. |
When you use the SQLsafeCmd command, the following actions can be performed:
Actions | Description | Example |
---|---|---|
Help | Display detailed descriptions and available options. | SQLsafecmd help <action> |
Backup | Backup a database. | SQLsafecmd help backup |
Restore | Restore a database. | SQLsafecmd help restore |
RestoreLast | Restore the most recent full backup of a database from the specified directory. | SQLsafecmd help restorelast |
InstantRestore | Instant Restore a database. | SQLsafecmd help instantrestore |
Verify | Verify a database backup. | SQLsafecmd help verify |
RestoreFileListOnly | List files for database in backup set. | SQLsafecmd help restorefilelistonly |
RestoreHeaderOnly | List backup sets in an archive. | SQLsafecmd help restoreheaderonly |
Browse TSM | Browse Tivoli Storage Management. | SQLsafecmd help browse TSM |
Expire TSM | Expire Tivoli Storage Management backup archives. | SQLsafecmd help expire TSM |
Extract TSM | Extract a file from Tivoli Storage Management. | SQLsafecmd help extract TSM |
License | Register a Backup Agent license. | SQLsafecmd help license |
EncryptBackupPassword | Encrypt plain-text password for encrypted backups. | SQLsafecmd help encryptbackuppassword |
EncryptRestorePassword | Encrypt plain-text password for encrypted restores. | SQLsafecmd help encryptrestorepassword |
EncryptSqlPassword | Encrypt plain-text password for SQL Server logins. | SQLsafecmd help encryptsqlpassword |
EncryptWindowsPassword | Encrypt plain-text password for Windows logins. | SQLsafecmd help encryptwindowspassword |
InstallXsp | Install SQL Server extended stored procedures for SQLsafe. | SQLsafecmd help installxsp |
Delete | Delete backup archives older than the specified date. | SQLsafecmd help delete |
LogShipBackup | Log Shipping primary backup. | SQLsafecmd help logshipbackup |
LogShipRestore | Log Shipping secondary restore. | SQLsafecmd help logshiprestore |
ObjectLevelRecovery | Restore database objects. | SQLsafecmd help objectlevelrecovery |
Create-Policy | Create a new policy. | SQLsafecmd help create-policy |
Edit-Policy | Edit existing policy. | SQLsafecmd help edit-policy |
AddDatabase | Deploy new database for existing policy (LogShipping or Backup policy). | SQLsafecmd help adddatabase |
BckDstType | Backup Destination. | SQLsafecmd help bckdsttype |
BackupFileType | Backup File Type. | SQLsafecmd help backupfiletype |