Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

SQL Safe provides you with CLI commands to help you manually

set instant restore operations

perform an Instant Restore to a database.



To perform

an instant restore operation

InstantRestore operations use the following commands:

  • SQLsafeCmd RestoreLast InstantRestore <db_name> <backup_archive> [options]

including the required options:

OptionDescription

-BackupLocation <filename>

<filename> - the filename pattern to restore.

The most recent backup file matching this pattern will
be restored.

 Set this to TSM for Tivoli Storage Manager.

-DatabaseName <db_name><db_name> - the database to restore.

Common Options

There are common options to perform restore operations:

  • SQLsafeCmd InstantRestore <db_name> <point_in_time> [options]



Where: 

Action

Description

<database_name>Name of the database.
<backup_archive>Path to the backup archive.

<point_in_time>

Date/Time {"MM/dd/yyyy hh:mm:ss"} to restore to.

Common Options

The following options help you perform InstantRestore operations:

Options

Descriptions

-BackupSet <index><index> - the index of the backup set within the backup archive. (1-based).
Options
Descriptions
-DisconnectUsersDisconnects all users from the target database before the restore operation begins.
-EncryptedRestorePassword <pwd><pwd> - the encrypted password used to decrypt the backup.
-InstanceName <name>

<name> - SQL server instance name.

Note: it is not required if

instance is

the instance is set as a default

instance

on the target server.

-Move <logical_filename> <target_filename>
Move

To move the database logical database file to the physical target file.

<logical_filename> - the database logical database file.

<target_filename> - the physical target file.

Corresponds to the WITH MOVE option in the RESTORE DATABASE T/SQL command.

-Password <pwd><pwd> - the non-encrypted password used to encrypt the backup.
-Server <hostname>

<hostname> - the hostname of server hosting the SQL Server where the operation should be performed.

Note: this option is required for accessing remote or clustered SQL Servers (where applicable).

-ReplaceOverride database if exists.

Security Options

There are different options to provide security to your restore last operationsSecure your InstantRestore operations with the following options:

Options

Description

-NoPrompt  Never prompt for credentials even if necessary.
-SecurityModel <model>

The security model used to log into SQL Server.

<model> -

 Integrated or SQL

 {Integrated, SQL}.

Note: Integrated (Windows authentication) is the default.

-SqlUsername <username><username> - the SQL Server username. (SQL SecurityModel).
-SqlPassword <pwd><pwd> - the SQL Server password. (SQL SecurityModel).
-EncryptedSqlPassword <pwd><pwd> - the encrypted SQL Server password generated by EncryptSqlPassword action. (SQL

SecurityModel).
-WindowsUsername <domain\user><domain\user> - the Windows user that will be used to read/write the backup archive.
-WindowsPassword <pwd><pwd> - the password for the Windows user.
-EncryptedWindowsPassword <pwd><pwd> - the encrypted password for the Windows user generated by EncryptWindowsPassword action. 

Advanced Options

The following table illustrates advanced restore last options help you perform InstantRestore operations:

Options

Description

-ArgsFile <filename>

The path to a file containing command-line arguments.

<filename> - specifies the file that contains the command line arguments.

-
ContinueAfterError

Instructs SQL Server to continue the operation despite encountering errors such as invalid checksums.

Diff <filename>

The differential backup.

<filename> - the file path to the differential backup.

This can be followed by -BackupFile, -BackupSet, or -Password to set individual options for this backup set.

-Log <filename>

The log backup.

<filename> the file path to the log backup.

This can be followed by -BackupFile, -BackupSet, or -Password to set individual options for this backup set.

-BackupFile <filename>

Specifies additional backup archive files to be used for striping backups.

<filename> - specifies the backup archive files.

 Note: use once for each additional stripe

Note: SQL 2005 and later only

.

-IncludeLogins

For backup, includes the database logins in the backup file.

For restore, creates the logins from the backup file on the destination server.

-ReportTLogFor backup, 'Yes' reports Skipped T-Log backups against databases that are in simple mode with a SUCCESS status rather than SKIPPED.
-MaxTransferSizeSpecifies the largest unit of transfer in bytes to be used between SQL Safe and the backup media.
The possible values are multiples of 65536 bytes (64KB) ranging up to 4194304 bytes (4 MB). This parameter is used to enable compression on TDE enabled databases only when the MaxTransferSize value is set to 65537 or higher. If omitted, the MaxTransferSize will be taken from the 'Transfer Limit' value set in the SQL Safe agent properties.
-Keep CDC

Flag to indicate whether the restore will support the Microsoft SQL Server Change Data Capture (CDC) feature.
The possible values are 1 (CDC restore will be supported) or 0 (CDC restore will not be supported). If the Keep CDC parameter is set to 1 then the CDC enabled database will be restored along with the CDC related artifacts and the Capture and Cleanup jobs will be created with the default options. If the parameter is omitted, CDC restore will not be supported.

-KeepReplication

Preserves replication settings when restoring a published database to a server other than that on which it was created.

-NoChecksum

Disables the validation of any checksums by the restore operation.

Note: for SQL 2005 and later only.

-MailTo <email_address>

<email_address> - an

e-mail

email address(es) to send

a

the notification via SMTP.

Note: multiple addresses may be separated by spaces, semicolons, or commas.

-NoStatus

Prevents status messages from being cached or sent to the Repository.

-RecoveryMode <mode> [-UndoFile <filename>]

Specifies the mode in which to leave the database after the operation is completed.

 <mode>

<mode> -  {NoRecovery

or

, Standby}.

Note: for Standby mode an undo file may be specified with the -UndoFile option.

-
RetryReads <interval> <retry_time> <total_time>

On a network file error, retry every certain amount of time.

<interval> - retry from every certain amount of time in seconds.

<retry_time> - retry up to certain amount of time in seconds.

<total_time> - total retry time allowed in minutes.

-UndoFile <filename>

<filename> - specifies the ABSOLUTE path to the undo filename.

Note: for Standby recovery mode only.

Tivoli Storage Manager Options

The following table illustrates the TSM options:

StopAt <datetime>

Specifies the database to be restored to the state it was in as of the specified date and time.

<datetime> - {"mm/dd/yyyy hh:mm:ss"}.

 Note: for Log BackupType only.

-StopAtMark <mark> [-After <datetime>]

Specifies recovery to the specified <mark>, including the transaction that contains the <mark>.

Note: for Log BackupType only.

-StopBeforeMark <mark> [-After <datetime>]

Specifies recovery to the specified <mark> but does not include the transaction that contains the <mark>.

Note: for Log BackupType only.

-After <datetime>

Recovery stops at the first <mark> having the specified name exactly at or after <datetime>.

Note: only valid with -StopAtMark/-StopBeforeMark options.

For Log BackupType only.

-Wait

Wait for hydration to complete before returning the result of operation.

Note: by default, it is set to return result of bringing database online

Options
 Description
-TsmClientOwnerName <name><name> - the client owner name.-TsmClientOwnerPassword <pwd><pwd> - the client owner password.-EncryptedTsmClientOwnerPassword <pwd><pwd> - the encrypted TSM client owner password.-TsmConfigFile <filename><filename> - the configuration file location.-TsmHighLevel <name><name> - the high level file specification (path).-TsmLowLevel <name><name> - the low level file specification (file name).-TsmTcpServerAddress <address><address> - the TCP/IP address for the TSM server.-TsmTcpPort <port><port> - the TCP/IP port address for the TSM server

.

For detailed descriptions and available options, see the CLI Help (SQLsafecmd SQLsafeCmd help restoreInstantRestore).

SQL Safe is a high-performance backup and recovery solution for your SQL Servers. Learn more > >

...



Scroll pdf ignore
Newtabfooter
aliasIDERA
urlhttp://www.idera.com
 | 
Newtabfooter
aliasProducts
urlhttps://www.idera.com/productssolutions/sqlserver
Newtabfooter
aliasPurchase
urlhttps://www.idera.com/buynow/onlinestore
 | 
Newtabfooter
aliasSupport
urlhttps://idera.secure.force.com/
 | 
Newtabfooter
aliasCommunity
urlhttp://community.idera.com
|
Newtabfooter
aliasResources
urlhttp://www.idera.com/resourcecentral
 | 
Newtabfooter
aliasAbout Us
urlhttp://www.idera.com/about/aboutus
Newtabfooter
aliasLegal
urlhttps://www.idera.com/legal/termsofuse

...