지금 지원 담당자와 채팅
지원 담당자와 채팅

LiteSpeed for SQL Server 8.9 - User Guide

About Backing Up/Restoring with LiteSpeed LiteSpeed User Interface Configure LiteSpeed for First Use Cloud Back Up Databases Automate Maintenance Tasks Restore Databases Restore Objects View Activity and History Use Command-Line Interface Use Extended Stored Procedures Troubleshoot LiteSpeed Review Additional Resources

Recast Litespeed Backups

The SLSRecast utility (slsrecast.exe) allows you to convert one LiteSpeed backup into another LiteSpeed backup through the command line, optionally changing encryption, compression, retention and other settings. Also, using this utility you can create disk stripe files, append several backups to one file, convert TSM objects to disk backups to restore on another machine. For more information, see Examples.

This topic covers:

Syntax

SLSRecast.exe ( -? | <source_options> <target_options> <other_options> )

Source Options:

-E|--SrcBackupFiles <path>
[-N|--SrcBackupIndex <file_number> ]
[-P|--SrcKey <password> ]

Target Options:

-F|--TgtBackupFiles <path>
[-K|--TgtKey <password> ]
[-I|--Overwrite ]
[(-C|--CompressionLevel 0...8 )|--AdaptiveCompression (Speed|Size)]
[-e|--EncryptionLevel 0...8 ]
[-y|--Expiration <time> ]
[-r|--RetainDays <number> ]
[-J|--DoubleClick]
[(-M|--OLRMap)
[--TempDirectory <path>] ]

Other Options:

[ -A|--Affinity <affinity_mask> ]
[ -p|--Priority -1...2 ]
[ -h|--Throttle 1...100 ]

[ -b|--BlockSize ]

[ -X|--IOFlags ]

Tape Options:

[-m|--TapeFormat 0...3}
[-w|--TapeRewind ]
[-u|--TapeUnload ]

TSM Options:

[-c|--TSMClientNode <node_name> ]
[-k|--TSMClientOwnerPwd <password> ]
[-j|--TSMConfigFile <path> ]
[-z|--TSMMgmtClass <class> ]
[ --TSMPointInTime]
[ --TSMDeviceTimeoutMinutes <number> ]
[ --TSMarchive ]
[ --TSMdsmi_dir <path> ]
[ --TSMdsmi_log <path> ]
[ --TSMLogname <name> ]

Arguments

NOTES:

  • Single-letter arguments are case-sensitive, and they can be preceded by a figure dash '-' or '/'.
  • Verbose multi-letter arguments are not case-sensitive, they must be preceded by double dashes '--'.

-Argument

--Argument

Description

(none) --AdaptiveCompression

Automatically selects the optimal compression level based on CPU usage or Disk IO. For more information, see Compression Methods.

You can tell Adaptive Compression to optimize backups either for size or for speed. This argument accepts one of the following values:

  • Size
  • Speed

-A

--Affinity

Processor affinity designates specific processors to run LiteSpeed, while not allowing LiteSpeed to run on the remaining processors.

This argument accepts decimal values and hexadecimal values. If a value begins with "0x" it is interpreted as hexadecimal. A positive 64-bit integer value translates to a binary mask where a value of 1 designates the corresponding processor to be able to run the LiteSpeed process.

NOTE: 32-bit Windows is internally limited to a 32-bit mask.

For example, you need to select processors 2, 3, and 6 for use with LiteSpeed. Number the bits from the right to left. The rightmost bit represents the first processor. Set the second, third, and sixth bits to 1 and all other bits to 0. The result is binary 100110, which is decimal 38 or hexadecimal 0x26. Review the following for additional information:

Decimal Value

Binary Bit Mask

Allow LiteSpeed Threads on Processors

0 0 All (default)

1

1

1

3

11

1 and 2

7 111 1, 2 and 3

38

100110

2, 3, and 6

205 11001101 1, 3, 4, 7, and 8

Tip: Before you start tuning the CPU Throttle or Affinity parameters to adjust backup performance, try limiting the number of threads. If you decide to use an affinity value other than default, it is recommended that you limit the threading as well. You may also want to consider using Adaptive Compression to maintain backup performance. For more information, see Adaptive Compression.

-O

--BaseSize

The smallest chunk of memory LiteSpeed attempts to write to disk at any given time.

-b

--BlockSize

Specifies the physical block size, in bytes. Supported values are: 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (Default).

-C

--CompressionLevel

Specifies the compression level for the backup. Valid values are 0 through 8. 0 bypasses the compression routines. The remaining values of 1 through 8 specify compression with increasingly aggressive computation. 2 is the default value for disk backups and 7 is the default value for cloud backups.

When choosing a compression level, it is best to try various options using your equipment and data to determine the best option for your environment. Use the Backup Analyzer to test the performance of different compression levels. For more information, see Test Optimal Backup Settings.

NOTE: If both the compression level and Adaptive Compression option are passed in, LiteSpeed will not error out and will select and use Adaptive Compression.

-J

--DoubleClick

Creates a Double Click Restore executable. This argument accepts one of the following values:

  • 1—Creates one Double-Click Restore executable file. Note the following warning: The executable may be greater than 4GB for large databases. Windows Server is unable to run executable files larger than 4GB. However, the file will be convertible/restorable by LiteSpeed file.
  • 2—Creates a Double Click Restore loader in the same location. (Default)

For more information, see Double Click Restore Executables.

-e

--EncryptionLevel

Specifies encryption level. Works in conjunction with the Key (K) parameter. This argument accepts one of the following values:

  • 0—40-bit RC2

  • 1—56 bit RC2

  • 2—112 bit RC2

  • 3—128 bit RC2

  • 4—168 bit 3DES

  • 5—128 bit RC4

  • 6—128 bit AES

  • 7—192 bit AES

  • 8—256 bit AES

  • 9—MS_AES_128

  • 10—MS_AES_192

  • 11—MS_AES_256

-y

--Expiration

Specifies the date and time when the backup expires. LiteSpeed will not overwrite this file until expiration datetime is passed. This argument accepts one of the following formats:

  • yyyy-mm-dd
  • yyyy-mm-dd hh:mm:ss
-X --IOFlags

Specifies if LiteSpeed should wait and retry the read or write operation on failure. You can define retry options using the following parameters:

  • DISK_RETRY_COUNT—Specifies the number of times that a specific operation will be retried on failure. The default is 4 retries, the maximum allowed setting is 1000.
  • DISK_RETRY_WAIT—Specifies the number of seconds to wait immediately following a failure before retrying. The default is 15 seconds, the maximum allowed setting is 300.

NOTE: This functionality is only available for disk and cloud operations.

For more information, see Network Resilience.

-L

--LogLevel

Creates a log file. This argument accepts one of the following values:

  • 0—Logging off.

  • 1 or any odd value—Logging on. Log file is removed on success.

  • 2 or any even value—Logging on.

The default output directory is C:\Documents and Settings\All Users\Application Data\Quest Software\LiteSpeed\SQL Server\Logs (or C:\ProgramData\Quest Software\LiteSpeed\SQL Server\Logs) (or C:\ProgramData\Quest Software\LiteSpeed\SQL Server\Logs). To log to a different directory run this utility with the following argument: --trace logpath = "path".

For more information, see Configure Logging in LiteSpeed.

-M

--OLRMap

Generates a map file during a backup for Object Level Recovery. This argument accepts one of the following values:

  • 0—False (default)
  • 1—True

-I

--Overwrite

Re-initializes (overwrites and replaces) the target backup files. For TSM backups, this will create the TSM object and version the backup based on the retention policy.

-p

--Priority

Specifies the priority of the LiteSpeed process compared to other processes running on the same server. This argument accepts one of the following values:

  • -1—Below Normal

  • 0—Normal (Default)

  • 1—AboveNormal

  • 2—High

-r

--RetainDays

Specifies a number of days to retain the backup. LiteSpeed will not overwrite this file for this number of days. 

-?

--ShowHelp

Displays the syntax summary of the LiteSpeed command-line utility.

-E

--SrcBackupFiles

Location and name of the source backup/restore file device(s). You can also specify a UNC path.

For TSM backups and TSM archives, this argument accepts the following formats:

  • tsmbkp:<filespace>\<high>\<low>
  • tsmarc:<filespace>\<high>\<low>

For more information, see Examples.

Tip: Multiple -E parameters are used for stripe files (Example 2). Converting multiple files to a single file is accomplished by running the commands more than once (Example 3).

-N

--SrcBackupIndex

Specifies the particular backup to use when recasting, restoring, extracting or reading from files with multiple appended backups. You can run xp_restore_headeronly to query the files contained within the backup set given by backup_file_name.

-P

--SrcKey

Password/key used to decrypt backup. Passwords are case-sensitive.

-m

--TapeFormat

Initializes the media on the device. This argument only applies to tape backups. This argument accepts one of the following values:

  • 0—Do not format (default)

  • 1—Write new header

  • 2—Long erase / write new header

  • 3—Low level controller format / write new header

NOTE: Any successful format operation (values 1, 2, and 3; not all are available to all drive types) lays down a LiteSpeed tape header that will identify this tape as containing LiteSpeed backups. Using @init=1 (or -I in the command line) will not lay down a tape header.

-w

--TapeRewind

Applies only to backing up and restoring tape. This argument accepts one of the following values:

  • 0—Leave the tape unwound (default)

  • 1—Rewind the tape after writing/reading

-u

--TapeUnload

Applies to tape backups and restores. This argument accepts one of the following values:

  • 0—Keep tape loaded (default)

  • 1—Unload and eject tape from the drive after operation

(none) --TempDirectory

Specifies a temporary directory for use with Object Level Recovery. Use this argument when the default Windows temp directory does not have enough free disk space for the restore process.

NOTE: You can specify the default temp directory using the TempPath parameter in the [LiteSpeed] section of the LiteSpeedSettings.ini file. (Usually, C:\Documents and Settings\All Users\Application Data\Quest Software\LiteSpeed\SQL Server\LiteSpeedSettings.ini.)

-F

--TgtBackupFiles

Location and name of the target backup/restore file device(s). You can supply multiple instances of this argument.

Examples:

UNC Path: \\servername\share\path\filename

Local path: c:\filedirectory\filename 

NOTE: You cannot use the same location for the source and target files if you want to recast files with the same names.

-K --TgtKey Password/key used to encrypt new backup.

-h

--Throttle

Specifies the maximum CPU usage allowed. The argument accepts an integer value between 1 and 100. The default value is 100. This is the percentage of the total amount of CPU usage (across all enabled processors) available.

TIP: Before you start tuning the CPU Throttle or Affinity parameters to adjust backup performance, try limiting the number of threads. If you decide to use an affinity value other than default, it is recommended that you limit the threading as well. You may also want to consider using Adaptive Compression to maintain backup performance. For more information, see Adaptive Compression.

(none) --TSMAdminName Specifies the TSM administrative user name that has client authority for the TSM node. Some operations may require an administrative user with client owner authority to be specified in order to open a TSM session. The correct username and password may be obtained from the TSM administrator.
(none) --TSMOptions Specifies the options that are used during the TSM session.
(none) --TSMAdminPwd Specifies the plain text password of the administrative user which is used to log in to the TSM server and start the TSM session.
(none) --TSMarchive Specifies to store the backup as a TSM archive. This argument accepts one of the following values:
-c --TSMClientNode

Specifies the TSM server LiteSpeed connects to during backups and restores. Not required, if specified in the options file or if backing up with the Passwordaccess Generate option.

-k --TSMClientOwnerPwd

Specifies the TSM client owner user password. Not required, if specified in the options file or if backing up with the Passwordaccess Generate option.

-j --TSMConfigFile Specifies the TSM configuration file.
(none) --TSMDeviceTimeoutMinutes Maximum wait time to acquire TSM device.
(none)

--TSMdsmi_dir

DSMI_DIR path if needed.

(none)

--TSMdsmi_log

DSMI_LOG path.

-i

--TSMFile

Defines the TSM filespace, high level and low level. This argument accepts the following format:

tsm_filespace\tsm_high_level\tsm_low_level

where:

  • tsm_filespace - is the logical space on the TSM server that contains a group of files. It can be the drive label name or UNC name.

  • tsm_high_level - specifies the directory path in which the file belongs.

  • tsm_low_level - specifies the actual name of the file.

NOTE: You may only store one item at the location specified by this argument. It is not possible to append an object to this location. You can use the -I command-line argument or @init to back up to a non-unique location.

(none) --TSMLogname

Log name.

-z --TSMMgmtClass

Specifies the TSM management class. If not specified, LiteSpeed uses the default management class.

(none) --TSMPointInTime

Specifies the date for restore/to filter results. If it is not passed, LiteSpeed will choose the most recent archived backup. The format is yyyy-mm-dd hh:mm:ss.

NOTE: If the backup was a striped backup and the point-in-times of the various striped files are different (rare but can be different a second or so), then the most recent of the times must be chosen.

Examples

  1. Convert a backup to a Double Click Restore executable:

    Slsrecast.exe -E 1.bkp --DoubleClick 2 -F new

  2. Convert a 4-striped backup to a single file:

    Slsrecast.exe -E 1.bkp 2.bkp 3.bkp 4.bkp -F new.bkp

  3. Convert a full, diff, and 2 t-log backups to a single appended file:

    Slsrecast.exe -E full.bkp -F new.bkp
    Slsrecast.exe -E diff.bkp -F new.bkp
    Slsrecast.exe -E tlog.bkp -F new.bkp
    Slsrecast.exe -E tlog.bkp -F new.bkp

  4. Change compression, remove the encryption, add an OLRMap file:

    Slsrecast.exe -E full.bkp -P password -F new.bkp -C 5 -M

  5. Recompress a backup at the highest compression level for archival:

    Slsrecast.exe -E old.bkp -F new.bkp -C 8

  6. Encrypt a backup:

    Slsrecast.exe -E old.bkp -F new.bkp -e 6 -K password

  7. Convert a TSM backup to a disk backup and convert to a Double Click Restore executable:

    Slsrecast -j c:\dsm.opt -E tsmbkp:test\test\test -c nodename -k password -F"D:\test.exe" -J2

  8. Stripe a TSM backup to 3 disk files:

    Slsrecast.exe -j tsmconfig.opt -E tsmbkp:fs\highlevel\lowlevel -F new1.bkp new2.bkp new3.bkp

Returns

0 (success) or 1 (failure)

 

Related Topic

Convert [[[Undefined variable Primary.product_Name]]] Backups to SQL Server Backups

The extraction utility (extractor.exe) allows you to create MTF compliant SQL Server backup files from LiteSpeed backup files through the command-line. The devices created by the extractor utility can be restored on any SQL Server using the native RESTORE DATABASE or RESTORE LOG commands. The utility must be run on the server where the backup files are located.

This topic covers:

To use the utility, run the command line and change the directory until you are in the LiteSpeed installation directory (Usually, C:\Program Files\Quest Software\LiteSpeed\SQL Server).

Syntax

extractor.exe ( -? | ( [-F <sqllitespeed_backup_file>]
        [-E <base_file_name>]
        [-N <file_number>]
        [-K <encryption_key>]
        [-L (0|1|2)]
        [-c <tsm_client_node>]

        [-i <tsm_filespace>]
        [-k <tsm_owner_password>]
        [-j <tsm_config_file>]
        [--TSMPointInTime <date_time>]
        [-I] ) )

Arguments

NOTES:

  • Single-letter arguments are case-sensitive, and they can be preceded by a figure dash '-' or '/'.
  • Verbose multi-letter arguments are not case-sensitive, they must be preceded by double dashes '--'.

-Argument

--Argument

Description

-?    

--ShowHelp

Displays the syntax summary of the LiteSpeed command-line utility.

-c --TSMClientNode

Specifies the TSM server LiteSpeed connects to during backups and restores. Not required, if specified in the options file or if backing up with the Passwordaccess Generate option.

-E

--MTFFile

Specify the location and name of the Microsoft Tape Format (MSTF) base file.

The extractor utility will create one backup device file for each thread used in a LiteSpeed backup.

The extracted files containing the native SQL Server backup will have the following format: base_file_namex.

Where:

  • base_file_name is the specified Microsoft Tape Format base file.

  • x is a number or letter that represents the sequence of the files. In case there are no additional files, the base file will not have an x appended to its name.

NOTES:

  • You can specify a network destination for this parameter.
  • You only need to specify this parameter once. The extraction utility will create all the necessary files automatically.
  • You cannot tell the extraction utility to extract a different number of native SQL Server files. However, you can specify different destinations for the extracted files by supplying a file name with the -E parameter for each of the native SQL Server files. To see how many files extractor.exe will create, run it without this parameter. See example 4 for more information.
  • If a full path is not specified, the extracted files will be created in the current directory.

-F

--BackupFile

The name of the LiteSpeed backup device file to be extracted. This argument accepts network destinations.

For TSM backups and TSM archives, this argument accepts the following formats:

  • tsmbkp:<filespace>\<high>\<low>
  • tsmarc:<filespace>\<high>\<low>

You can supply multiple instances of this argument.

-I

--Overwrite

Re-initializes (overwrites and replaces) the target native backup files.

-j --TSMConfigFile Specifies the TSM configuration file.
-k --TSMClientOwnerPwd

Specifies the TSM client owner user password. Not required, if specified in the options file or if backing up with the Passwordaccess Generate option.

-i --TSMFile

Defines the TSM filespace, high level and low level. This argument accepts the following format:

tsm_filespace\tsm_high_level\tsm_low_level

where:

  • tsm_filespace is the logical space on the TSM server that contains a group of files. It can be the drive label name or UNC name.

  • tsm_high_level specifies the directory path in which the file belongs.

  • tsm_low_level specifies actual name of the file.

NOTE: You may only store one item the location specified by this argument. It is not possible to append an object to this location. You can use the -I command-line argument or @init to back up to a non-unique location.

(none) --TSMPointInTime

Specifies the date for restore/to filter results. If it is not passed, LiteSpeed will choose the most recent archived backup. The format is yyyy-mm-dd hh:mm:ss.

NOTE: If the backup was a striped backup and the point-in-times of the various striped files are different (rare but can be different a second or so), then the most recent of the times must be chosen.

-L

--LogLevel

Creates a log file. This argument accepts one of the following values:

  • 0—Logging off.

  • 1 or any odd value—Logging on. Log file is removed on success.

  • 2 or any even value—Logging on.

The default output directory is C:\Documents and Settings\All Users\Application Data\Quest Software\LiteSpeed\SQL Server\Logs (or C:\ProgramData\Quest Software\LiteSpeed\SQL Server\Logs) (or C:\ProgramData\Quest Software\LiteSpeed\SQL Server\Logs). To log to a different directory run this utility with the following argument: --trace logpath = "path".

For more information, see Configure Logging in LiteSpeed.

-K

--Key

Value used to generate the encryption key for the encryption algorithm. If you do not supply encryption key, then the program will not encrypt the backup. If you use the wrong encryption key, the restore will fail.

Caution: When encrypting data, take care not to lose the encryption key; a backup cannot be restored or recovered without the original encryption key.

Example of key: 'Mypassword'

-N

--BackupIndex

Specifies the particular backup to use when recasting, restoring, extracting or reading from files with multiple appended backups. You can run xp_restore_headeronly to query the files contained within the backup set given by backup_file_name.

Examples

  1. Extract a LiteSpeed backup to a Network Share:

    extractor.exe -F "C:\temp\Northwind.bak" -E \\my_server\my_share\Native.bak

  2. Extract only the first backup in a backup set:

    extractor.exe -F "C:\temp\Northwind.bak" -E "C:\temp\NorthwindNative.bak" -N 1

  3. Extract a striped LiteSpeed backup:

    extractor.exe -F "C:\temp\LS1.bak" -F "C:\temp\LS2.bak" -F "C:\temp\LS3.bak" -F "C:\temp\LS4.bak" -E "C:\temp\Native.bak"

    NOTE: The number of extracted files does not have to match the number of files in a LiteSpeed backup. For more information, see Arguments. about the -E parameter.

  4. Extract a LiteSpeed backup to different locations.
    1. See how many destination files the extractor utility is going to create for the LiteSpeed backup:

      extractor.exe -F"c:\Backup\Northwind.bak"

    2. Specify one filename for each destination file. The number of file names you specify with the -E parameter must match the number of files the extractor utility has returned for the LiteSpeed backup. The example below has 3 destination files:

      extractor.exe -F"c:\Backup\Northwind.bak" –E "c:\Data\NW1.bak" "e:\Data\NW2.bak" \\my_server\my_share\NW3.bak

  5. Extract a TSM backup to native SQL Server backup:

    extractor.exe -c"10.0.1.200" -k"password" -j"C:\Program Files\Tivoli\TSM\baclient\dsm.opt" -F tsmbkp:fsMH\nw\test -E "C:\temp\TestNative.bak"

Returns

0 (success) or 1 (failure)

 

Related Topic

Restore Objects with the Command-Line Interface

Object Level Recovery utility (olr.exe) allows you to restore objects from the command-line interface (CLI).

This topic covers:

Syntax

olr.exe ( -? | <list_backup_contents> | <view_or_restore_tables> | <restore_other_objects> | <execute_select_script>)

Connection Options:

-U <username>
-P <password>

Backup Files:

-F <full_backup_filename>
    [-N <file_number>]
    [-K <encryption_key>] ]
[-D <diff_backup_filename>
    [-N <file_number>]
    [-K <encryption_key>] ]
[-g <log_backup_filename>
    [ ( [-N <file_number>]
      [-K <encryption_key>] )
    | (-h <striped_log_backup_filename>
        [-N <file_number>]
        [-K <encryption_key>] ) ] ]
[-L (Create|Keep|Delete)]

Cloud connection options:

[--CloudVendor <vendor name>]

[--CloudAccessKey <key name>]

[--CloudAccessKeyEnc <encrypted key name>]

[--CloudSecretKey <key name>]

[--CloudSecretKeyEnc <encrypted key name>]

[--CloudBucketName <bucket name>]

[--CloudRegionName <cloud region name>]

[--CloudGovRegion <government region number>]

[--CloudStorageClass <standard, standard-ia, standard-rrs>]

[--AWSUseServerSideEncryption <1, 0>]

[--AzureBlobType <block, page>]

[--CloudAutoStriping <1, 0>]

[--CloudAutoStripingThreshold <param size in GB>]

[--UseSSL <1, 0>]

Script Options:

[ -G <ON_filegroup_name> ]
[ -I <TEXTIMAGE_ON_filegroup_name> ]
[ -i <table_objects> ]
[ -p <prefix> ]
[ -s <suffix> ]
[ --UDT <0|1> ]

List Contents:

-V
[-Y <object_type>]
<backup_files>

View or Recover Tables:

-O <table_name>
-E <destination_server_name>
[ (-S <database_name>
[-T <table_name>]
[-W <temp_directory>]
[-X <ship_directory>] ) |
-J <output_filename> ]
[<script_options>]
<backup_files>
<connection_options>

Recover Objects Other than Tables:

( -C [ <object_name> ]
-Y ( object_type | 'Database' )
| -Z <objects_filename> )
[ -Q <script_filename> ]
[<script_options>]
<backup_files>
[-y ]
[-W <temp_directory>]
-E <destination_server_name>
<connection_options>

Execute Select Script:

-B
(-H <script_text> | -Q <script_file_name>)
[-y ]
-E <destination_server_name>
[ (-S <database_name>
[-T <table_name>]
[-W <temp_directory>]
)
| -J <output_filename> ]
<backup_files>
<connection_options>

NOTES: 

  • Arguments are case sensitive and can only be preceded with "-".
  • Either use -H or -Q but not both.
  • Either use -J or -T (with -S and -W) but not both.
  • -B, -C, -O, -V and -Z parameters are mutually exclusive.

Arguments

Argument

Name

Description

-?

--Help

Displays the syntax summary of the LiteSpeed command-line utility.

-B

--ExecuteScript

Indicates Execute SELECT mode of operation.

-b --BackEnd

Object Level Recovery can restore tables using two different internal techniques to handle the record inserts.

The first and default method uses BCP files and a TSQL BULK INSERT statement. Object Level Recovery will write a BCP format file and an accompanying binary data file to the local file system. These files may become very large depending on the table size and will require permissions to write to a temporary directory. The default TEMP location can be set by using the @TempDirectory parameter or by setting a permanent temp location in the LiteSpeed configuration file.

An alternate insertion method can be specified to use Sql Server’s Sql Native Client capabilities. This method inserts row-data directly into the destination database bypassing any storage on the local file-system. To enable this method, use the parameter @backend='SQLNativeClient' (or -b 1 from the command line). To make this the default method set the value “BackEnd=SQLNativeClient” in the Object Level Recovery section of the LiteSpeed configuration file.

Regardless of the insertion method used, the batch size can be globally managed by setting the value “BulkImportBatchSize=<N>”. This will set the number of row inserts for each batched transaction.

-C <object_name>

--CreateScript

Specifies the name of the object to recover.

-d

--RestoreAsOnDiskTable

This option allows you to restore an in-memory table as a regular table.

-D <diff_backup_filename>

--DifferentialBackupFileName

Name of backup file to restore. Used for differential backups instead of full backup files. You can supply multiple instances of this argument.

-E <destination_server_name>

--DestinationServer

Name of the destination server.

-F <full_backup_filename>

--FullBackupFilename

Location and name of the backup file device containing the object to recover.

Examples:

UNC Path: \\servername\share\path\filename

Local path: c:\filedirectory\filename 

NOTE: There can be multiple files but they must be listed in the order in which they were backed up.

-G <filegroup_name>

--OnFileGroup

Destination ON filegroup name.

-g <log_filename> --LogBackupFileName

Specifies location and name of the log backup file. You can supply multiple instances of this argument.

-H <script_text>

--ScriptText

SELECT Script literal text. For more information, see Supported SELECT Statements.

-h <striped_logfilename> --LogBackupStripeFileName

Specifies the striped log file name.

NOTE: The striped files for a given log backup must be specified before the next log backup set is specified.

-i <table_objects> --IncludeTableObjects

Instructs LiteSpeed to script or recover one or more of the following:

  • Constraints—But not foreign keys
  • ForeignKeys
  • Indexes
  • Statistics
  • Triggers
  • All—All of the above

The value is a list of options, separated with commas.

-I <filegroup_name>

--TextImageOnFileGroup

Destination TEXTIMAGE_ON filegroup name. Used to restore a BLOB (binary large object).

-J <filename>

--ResultsFileName

Name of comma separated file (.csv) that is generated instead restoring into a database. This is an ad hoc solution for users want to see the restored data in Excel. You can only use this argument for text data.

-k

--KeepComputedColumns

Instructs LiteSpeed to keep the computed columns with the object restore. This argument accepts one of the following values:

  • 0—False
  • 1—True

-K <encryption_key>

--Key

Value used to generate the encryption key for the encryption algorithm. If you do not supply encryption key, then the program will not encrypt the backup. If you use the wrong encryption key, the restore will fail.

Caution: When encrypting data, take care not to lose the encryption key; a backup cannot be restored or recovered without the original encryption key.

Example of key: 'Mypassword'

-l

--LSMPath

Specify a custom path for finding or creating the LSM file.

-L <option>

--LSM

Specifies handling for OLR LSM mapfile(s).

  • Create—Reads backup and creates a new mapfile. It will ignore attached LSM.
  • Keep—Does not delete mapfile(s) when complete.
  • Delete—Always deletes mapfile(s) when complete.

-M

--FileStreamOnFileGroup

Specifies a file stream filegroup to include in the object restore.

-m

--PersistLogProcessing

Instructs LiteSpeed to persist log processing, so the same database backup does not have to be processed for each Object Level Recovery operation. This argument accepts one of the following values:

  • 0—False (Default).
  • 1—True. LiteSpeed will persist transaction log backups specified and the tail log for future use. This option can offer a huge performance gain for working with databases with large tail logs that could possibly take a long time to process.

-N <file_number>

--FileNumber

Specifies the particular backup to use when recasting, restoring, extracting or reading from files with multiple appended backups. You can run xp_restore_headeronly to query the files contained within the backup set given by backup_file_name.

-O <object_name>

--RestoreTable

Specifies the name of the object to recover.

NOTE: Currently only tables. Table name must be preceded by database owner.

-p <prefix> --PrefixTableObjects

Adds a prefix to the names of the table's objects you selected to script or recover.

-P <password>

--Password

Specifies the user password. Passwords are case-sensitive. Required if the connection type is not a trusted connection.

-Q <script_file_name>

--ScriptFileName

The file name that the script is output into. When used with execute-select, this file contains the select statement(s).

For more information, see Supported SELECT Statements.

-R --Trusted

This is Windows Authentication.

-s <suffix> --SuffixTableObjects

Adds a suffix to the names of the table's objects you selected to script or recover.

-S <destination_database_name>

--DestinationDatabase

Specifies the destination database.

-t

--Trace

Used by LiteSpeed to activate trace logging.

-T <destination_table_name> 

--TableName

Specifies the name of the destination table. LiteSpeed will not overwrite an existing table. If you select the same server instance and database as the original table, you must use a different table name.

NOTE: For Execute-Select operations, LiteSpeed will attempt to insert (append) all selected records into existing table.

-U <username>

--UserName

Specifies user login ID. Required if the connection type is not a trusted connection.

Login IDs are case-sensitive.

--UDT  

Create table script:

  • 0—Off. Create table with native types, if possible; othervise (CLR UDT) create with UDT. (Default).
  • 1—On. Create table with UDT.

-V

--ViewContents

View contents.

-W <temp_directory>

--WriteDirectory

Specifies a temporary directory for use with Object Level Recovery. Use this argument when the default Windows temp directory does not have enough free disk space for the restore process.

NOTE: You can specify the default temp directory using the TempPath parameter in the [LiteSpeed] section of the LiteSpeedSettings.ini file. (Usually, C:\Documents and Settings\All Users\Application Data\Quest Software\LiteSpeed\SQL Server\LiteSpeedSettings.ini.)

-X <ship_directory>

--ShipDirectory

Ship directory for packaging files for subsequent restore.

-Y <object_type>

--Type

Specifies the type of object. If you omit this parameter the object type defaults to table, so you should use this argument to recover schema objects other than tables. This argument accepts one of the following values:

  • All 1, 3
  • Database
  • Default
  • ExtendedProcedure
  • Function
  • IndexedView
  • MemoryOptimizedTable
  • PartitionFunction
  • PartitionScheme
  • Role 1
  • Rule
  • StoredProcedure
  • SystemTable
  • Table
  • TableConstraintClustered 2
  • TableConstraints 2
  • TableForeignKeys 2
  • TableIndexClustered 2
  • TableIndexes 2
  • TableStatistics2

  • TableTriggers 2
  • Trigger
  • Type
  • User 1
  • View
  • XmlSchemaCollection

Notes:
1 These values cannot be used to create scripts.
2 These values are pseudo-object types and are not real schema objects. They are only used to generate SQL scripts to alter the table, and they will be ignored when used with -V or xp_objectrecovery_viewcontents. When one of these values is used with -C or xp_objectrecovery_createscript, @ObjectName (-C) is not the name of the object, but the name of the owning table.
3 This value lists all object types, which are prefixed with "object_type, ". All pseudo-table object types will be listed even though they might not exist for the associated table.

-y --DisableLogProcessing

Instructs LiteSpeed to skip all transaction log backups and tail log processing. This may improve read and recovery times.

-Z <filename>

--ObjFileName

Identifies a file that contains a list of objects. The format of this file is "ObjectType,ObjectName" per line.

Tip: You can use -V and -Y arguments to create the objects list.

Cloud-Specific Arguments

Cloud-specific arguments work in conjunction with the LiteSpeed arguments. See Syntax and Examples for more information.

-Argument

--Argument

Description

(none) --AWSUseServerSideEncryption

The @AWSUseServerSideEncryption argument enables the encryption of data stored at rest in Amazon S3. This argument accepts one of the following values:

  • 0—Do not use Server Side Encryption
  • 1—Use Server Side Encryption
(none) --AzureBlobType

The @AzureBlobType argument specifies the types of blobs that can be stored in the Microsoft Azure cloud storage. This argument accepts one of the following values: "Block", "Page".

note: The LiteSpeed auto striping logic used in the @CloudAutoStriping and @CloudAutoStripingThreshold parameters can override the Azure blob limit for LiteSpeed backups.

(none) --CloudAccessKey

The @CloudAccessKey argument specifies the name of the unique Cloud Web Service alphanumeric access key that identifies each user. The selections include Amazon Access Key, Azure Account Name, Google e-mail styled account.

(none) --CloudAccessKeyEnc

The @CloudAccessKeyEnc argument specifies the name of the encrypted unique Cloud Web Service alphanumeric access key that identifies each user.

(none) --CloudAutoStriping

This parameter enables automatic file striping for LiteSpeed cloud backups.

(none) --CloudAutoStripingThreshold

This parameter contains the stripe size in GBs. LiteSpeed logic uses the database size to make a decision about the number of stripes needed for LiteSpeed cloud backups. For example, if you have a database with a size of 200GB and set @CloudAutoStripingThreshold = 50, then LiteSpeed uses 200/50 = 4 stripes.

(none) --CloudBucketName

The @CloudBucketName argument specifies the name of the container for cloud objects. Bucket names must be at least 3 and no more than 63 characters long. The selections are Amazon Bucket Name, Azure Container Name, Google Bucket Name. Google Bucket Name requirements are described at https://cloud.google.com/storage/docs/naming.

(none) --CloudGovRegion

The @CloudGovRegion argument enables a special restricted region for the US Government use in Amazon S3 and Azure Clouds. This argument accepts one of the following values:

  • 0—Do not use government cloud (default)
  • 1—Use government cloud
(none) --CloudRegionName

The @CloudRegionName argument specifies the name of the Cloud Web Service region to use for a bucket. Example values are but not limited to: us-east-1, us-east-2, us-west-1, us-west-2, ca-central-1, eu-central-1, eu-west-1, eu-west-2, ap-south-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, ap-northeast-2, sa-east-1, N'Germany' and N'China'.

(none) --CloudSecretKey

The @CloudSecretKey argument specifies the name of the Cloud Web Service secret key that is assigned when you initially get a Cloud account.

(none) --CloudSecretKeyEnc

The @CloudSecretKeyEnc argument specifies the name of the encrypted Cloud Web Service secret key that is assigned when you initially get a Cloud account.

(none)

--CloudStorageClass

The @CloudStorageClass argument specifies a range of storage classes established for different use cases including:

For Amazon S3:

  • Standard: Standard storage - for general-purpose storage of frequently accessed data.
  • Standard-IA: Standard Infrequent Access - for long-lived, but less frequently accessed data.
  • RRS: Reduced Redundancy Storage - for non-critical data considering lower level of redundancy rather than Standard storage.

Important: : In versions less than 8.5 you should use --AWSStorageClass. The @AWSStorageClass argument is no longer valid in subsequent LiteSpeed versions after 8.5.

For Google Storage:

  • Multi_regional - for frequently accessed data around the world as per serving website content, streaming videos, or gaming and mobile applications.
  • Regional - for frequently accessed data in the same region as your Google Cloud DataProc or the Google Compute Engine instances that use it, as per data analytics.
  • Nearline - for infrequently accessed data (data you expect to access no more than once per month).
  • Coldline - for infrequently accessed data (data you expect to access no more than once per year).
(none) --CloudVendor

The @CloudVendor argument specifies the name of the cloud service provider. The argument accepts one of the following values: "AmazonS3", "AzureBlob" or "GoogleStorage".

(none) --GSProject

DEPRECATED LiteSpeed 8.8: Was used to store for the Google Cloud Storage project ID; the project ID is now obtained from login. This parameter is retained for compatibility with old backup/restore scripts.

(none)

--UseSSL

The @UseSSL argument specifies that the connection uses SSL security. This argument accepts one of the following values:

  • 0—Do not use SSL
  • 1—Use SSL (default)

Examples

  1. List all objects in the LiteSpeedLocal database in the LITESPEED_full.bak backup file:

    olr.exe -V -F "C:\temp\LITESPEED_full.bak" -Y "All"

  2. Preview a table, do not use tail log:

    olr.exe -F "C:\temp\LITESPEED_full.bak" -N 1 -O dbo.LitespeedActivity -y -E LITESPEED\SQL2005

  3. Recover the contents of the LiteSpeedActivity table to the LITESPEED\SQL2005 server, TEST database, LiteSpeedActivity117 table:

    olr.exe -F "C:\temp\LITESPEED_full.bak" -N2 -D "c:\temp\LITESPEED_diff.bak" -N3 -O dbo.LiteSpeedActivity -E LITESPEED\SQL2005 -S TEST -Tdbo.LiteSpeedActivity117

  4. Recover the contents of the LiteSpeedActivity table to the LITESPEED\SQL2005 server, TEST database, LiteSpeedActivity table using custom temp directory:

    olr.exe -F "C:\temp\LITESPEED_full.bak" -N2 -D "c:\temp\LITESPEED_diff.bak" -N3 -O dbo.LiteSpeedActivity -E LITESPEED\SQL2005 -S TEST -Tdbo.LiteSpeedActivity -Wd:\products

  5. Recover dbo.Employees from a striped backup:

    olr.exe -F "C:\temp\FOX_full.bak" -K****** -g"C:\temp\FOX_tlog1.bak" -h"C:\temp\FOX_tlog2.bak" -h"C:\temp\FOX_tlog3.bak" -K****** -Odbo.Employees -i "constraints, foreignKeys" -E LITESPEED\SQL2005 -S HR -Tdbo.Employees

  6. Query the backup:

    olr.exe -F "C:\temp\LITESPEED_full.bak" -B -H "select top (100)* from dbo.LiteSpeedActivity" -E LITESPEED\SQL2005

  7. Execute select script and save results in a database:

    olr.exe -F "C:\temp\LITESPEED_full.bak" -B -Q "C:\temp\New Folder\select_script.sql" -E LITESPEED\SQL2005 -SQResults -T DBID6

  8. Query the backup and save results in a .csv file:

    olr.exe -F "C:\temp\LITESPEED_full.bak" -B -H "select * from dbo.LiteSpeedActivity where PercentCompleted < 100" -E LITESPEED\SQL2005 -J "C:\LS_Activity.csv"

  9. Create scripts in the "c:\temp\scripts" folder to recover dbo.Employees later:

    olr.exe -F "C:\temp\FOX_full.bak" -K****** -g"C:\temp\FOX_tlog1.bak" -h"C:\temp\FOX_tlog2.bak" -h"C:\temp\FOX_tlog3.bak" -K****** -Odbo.Employees -i "constraints, foreignKeys" -E LITESPEED\SQL2005 -S NHR -T dbo.Employees -X c:\temp\scripts

  10. Generate a script to restore the table schema only:

    olr.exe -F "C:\temp\LITESPEED_full.bak" -N 1 -C dbo.LitespeedActivity -i "constraints, foreignkeys" -s "_restored"

  11. Generate a script for an object other than a table:

    olr.exe -F "C:\temp\FOX_full.bak" -K****** -N3 -C dbo.FOX_view -Y View

  12. Create a script file for objects listed in the objects.txt file:

    olr.exe -F "C:\temp\FOX_full.bak" -K****** -N3 -Z "c:\temp\objects.txt" -Q d:\temp\create_view.sql

  13. Create a 'Create Database' script:

    olr.exe -F "C:\temp\FOX_full.bak" -K****** -N3 -C -Y Database -Q d:\temp\create_database_FOX.sql

  14. Restore Objects

    olr.exe -F "C:\temp\FOX_full.bak" -K****** -N3 -C -Y Database -Q d:\temp\create_database_FOX.sql --UDT 0

  15. Read files direct from cloud storage

    olr.exe -F "s3:\\bucket.US\abyr-full-s3.bak" -V -Y All --CloudVendor "AmazonS3" --CloudAccessKeyEnc "***" --CloudSecretKeyEnc "***"

Returns

0 (success) or 1 (failure)

 

Related Topics

LicenseInfoCmd Utility

The LicenseInfoCmd utility allows you to license LiteSpeed from the command line.

NOTE: This utility will only register a local copy of LiteSpeed.

To use the utility, run the command line and change the directory until you are in the LiteSpeed installation directory (Usually, C:\Program Files\Quest Software\LiteSpeed\SQL Server).

Syntax 

LicenseInfoCmd.exe (-? | -r | ([-s] -l <license_key> [-m <site_message>]) )

Examples

  1. View information about the accepted parameters:

    LicenseInfoCmd.exe -?

  2. View information about the supplied license key

    LicenseInfoCmd.exe -l C20TM3Q3K2HD74UDLBMHC6KYV6HZ3MQFNXZFB-123-45678-34

  3. Register the supplied license key

    LicenseInfoCmd.exe -l C20TM3Q3K2HD74UDLBMHC6KYV6HZ3MQFNXZFB-123-45678-34 -s

  4. Remove the currently installed license

    LicenseInfoCmd.exe -r

NOTE: LicenseInfoCmd needs to be run from an elevated command prompt on Windows Vista/2008/7/8/10 to be able to store or remove the license key.

On upgrade from a LiteSpeed 8.5 or earlier installation the site message parameter is required as in:

LicenseInfoCmd.exe -l C20TM3Q3K2HD74UDLBMHC6KYV6HZ3MQFNXZFB-123-45678-34 -m "Trial Version"

LicenseInfoCmd.exe -l C20TM3Q3K2HD74UDLBMHC6KYV6HZ3MQFNXZFB-123-45678-34 -m "Trial Version" -s

 

Related Topic

License Registration

관련 문서

The document was helpful.

평가 결과 선택

I easily found the information I needed.

평가 결과 선택