Chatee ahora con Soporte
Chat con el soporte

LiteSpeed for SQL Server 8.8 - 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

xp_slssqlmaint

This extended stored procedure executes the slssqlmaint.exe utility. It accepts a string that contains the command-line arguments to be passed directly to slssqlmaint.exe.

NOTE: You can generate scripts by opening tasks in the LiteSpeed UI Console and clicking View T-SQL. About Creating Maintenance Plans

Syntax

EXEC master.dbo.xp_slssqlmaint '<task_options> '

Script Maintenance Plans Tasks about the task options and the syntax for scripting maintenance plan tasks.

Examples

Back up database

exec master.dbo.xp_slssqlmaint N'-D Regex:"LiteSpeed" Regex:"DB1" -BkUpMedia DISK -DelBkUps 3DAYS -BkUpDB "C:\temp" -CrBkSubDir -BkExt "bak" -Logging 1 -Reliability 1 -CompressionLevel 1 -Default "%D_%T_%z.%EXT%" -Exclude Offline LogShippng ReadOnly '

Mirror to Disk

execute master.dbo.xp_slssqlmaint N'-D "at1" -BkUpMedia DISK -BkUpDB "c:\backup" -BkFileName -Logging 0 -CompressionLevel 2 -Mirror "c:\mirror\" -OPTOLR -SmartDiff 14DAYS -DataDelta 35 -SingleFile 0 -BackupEsc -Exclude Offline LogShippng IgnoreReplica Secondary ReadOnly '

Mirror to Cloud

execute master.dbo.xp_slssqlmaint N'-D "TestDatabase" -BkUpMedia DISK -BkUpDB "c:\backup\%SERVER%_%D_%T_%z.bak" -BkFileName -Logging 0 -CompressionLevel 2 -Mirror "c:\mirror\" "{""cloud"":""AmazonS3"",""accessKey"":""lkjflkjsldjiofsjrdfftgrux5j+OwkI"",""secretKey"":""’plkljhlkwjnuildiIujUhjkHkldkflkdfe"",""container"":""irelandaatest"",""authType"":""AccessAndSecretKeys"",""region"":""us-east-1"",""storageClass"":""0"",""useSSE"":""False"",""useSSL"":""True"",""isGovCloud"":""False"",""useAcceleration"":""False"",""useAutoStriping"":""True"",""autoStripSize"":""0"",""paths"":[""test/""]}" -OPTOLR -Exclude Offline LogShippng IgnoreReplica Secondary ReadOnly '

Clean up maintenance plans

exec master.dbo.xp_slssqlmaint '-MAINTDEL -DELTYPE FileBkup -DELSUBFOLDERS -DelEmptyFolder -DELFOLDER "C:\temp\" -DELEXTENSION "bak" -DELUNIT "3" -DELUNITTYPE "WEEKS" -DELUSEAGE -NO_OUTPUT '

 

Related Topic

xp_sqllitespeed_licenseinfo

Using xp_sqllitespeed_licenseinfo you can register a new LiteSpeed license key or remove licensing information (unlicense LiteSpeed). Without the arguments, this extended stored procedure returns a result set showing the currently installed LiteSpeed license.

Syntax

EXEC master.dbo.xp_sqllitespeed_licenseinfo
[ @licensekey = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-111-22222-YY'
[, @sitemessage = 'Site_Message' ]
[, @ShowLicenseNumber = 1 ]
[, @store = 1]
| @remove = 1]

Arguments

@licensekey

Passes license key value.

@sitemessage

Passes license site message. Applicable to upgrades from a LiteSpeed 8.5 or earlier installation.

@ShowLicenseNumber = 1 Show the Customer License Number. The Customer License Number is part of the license key and is required to access support.

@store = 1

Overwrites any currently stored licenses with the valid license supplied.

@remove = 1

Removes the currently stored license.

Examples

  1. View information about the supplied license key:

    EXEC master.dbo.xp_sqllitespeed_licenseinfo
    @licensekey = 'C20TM3Q3K2HD74UDLBMHC6KYV6HZ3MQFNXZFB-123-45678-34'

  2. Register a license key:

    EXEC master.dbo.xp_sqllitespeed_licenseinfo
    @licensekey = 'C20TM3Q3K2HD74UDLBMHC6KYV6HZ3MQFNXZFB-123-45678-34'
    , @store=1

  3. Remove license key:

    EXEC master.dbo.xp_sqllitespeed_licenseinfo
    @remove= 1

  4. View information about the supplied license key (upgrades from a LiteSpeed 8.5 or earlier installation):

    EXEC master.dbo.xp_sqllitespeed_licenseinfo
    @licensekey = 'C20TM3Q3K2HD74UDLBMHC6KYV6HZ3MQFNXZFB-123-45678-34'
    , @sitemessage = 'Trial Version'

  5. Register a license key (upgrades from a LiteSpeed 8.5 or earlier installation) :

    EXEC master.dbo.xp_sqllitespeed_licenseinfo
    @licensekey = 'C20TM3Q3K2HD74UDLBMHC6KYV6HZ3MQFNXZFB-123-45678-34'
    , @sitemessage = 'Trial Version'
    , @store=1

  6. Show the Customer License Number. The Customer License Number is part of the license key and is required to access support.

    EXEC master.dbo.xp_sqllitespeed_licenseinfo @ShowLicenseNumber = 1

Result Set

Column Name Data Type Description
Product Name nvarchar(128) LiteSpeed for SQL Server.
License Key nvarchar(128) Key license value.
License Site Message nvarchar(128) Site message. Applicable to upgrades from a LiteSpeed 8.5 or earlier installation.
License Type nvarchar(128)

One of the following:

  • Trial—a dated trial license key that expires on a specific date
  • Permanent—a permanent license key
  • Term—similar to trial keys, except it comes with support
Edition nvarchar(128)

Enterprise or Standard.

Site License bit

Whether the key is a Site license key that is used company-wide.

Gigabyte Limit int Database size limit in GB. If there is a gigabyte limit set in the license (any value larger than 0), LiteSpeed will fail any backup of databases larger than the limit. 0 indicates unlimited database size.
Trial Length int

Number of trial days. The default value is 15.

NOTE: Some types of trials may have 0, if the expiration date is fixed and not based on the install date.

Expire Date datetime Date value (Trial and Term only).

 

Related Topics

xp_sqllitespeed_version

This extended stored procedure returns the name and version of the installed LiteSpeed components.

exec master.dbo.xp_sqllitespeed_version

 

xp_view_tsmcontents

Retrieves TSM specific information and backup header information for the given LiteSpeed backup.

This topic covers:

Syntax

EXEC master.dbo.xp_view_tsmcontents
@tsmclientnode = 'TSM_client_node'
, @tsmclientownerpwd = 'TSM_client_owner_password'
, @tsmfilespace = 'TSM_filespace'
, @tsmconfigfile = 'TSM_configuration_file'
[, @tsmhighlevel ='TSM_high_level']
[, @tsmlowlevel = 'TSM_low_level']
[, @tsmarchive= 0 | 1 ]
[, @desc='description']
[, @tsminsdatelower='date_time']
[, @tsminsdateupper='date_time']
[, @tsmexpdatelower='date_time']
[, @tsmexpdateupper='date_time']
[, @tsmbrieflist = 1 | 0 ]
[, @tsmsortbypit = 0 | 1 ]
[, @tsmsortbylowlevel = 0 | 1 ]
[, @tsmpointintime = 'date_time']

Arguments

Tips:

  • To see the list of accepted arguments and data types for arguments, execute the following:
    exec master.dbo.<procedure_name> show_help

  • To convert the script for use with the command-line utilities, execute the following:
    exec master.dbo.<procedure_name> show_cmd, <xp_arguments>

@desc

Specifies a description to filter the returned results to those that match the pattern.

NOTE: @desc is only supported if @TSMBriefList=0.

@tsmarchive

Specifies to store the backup as a TSM archive. This argument accepts one of the following values:

  • 0—False (default)
  • 1—True

@tsmbrieflist

Returns a brief list. This argument accepts one of the following values:

  • 0—False
  • 1—True (default)

NOTE: It is not needed for archives as they are only returned as a brief list.

@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.

@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.

@tsmconfigfile

Specifies the TSM configuration file.

You can use the %TSMDEFAULTPATH% variable to make LiteSpeed detect the default TSM configuration file path automatically (by getting from LiteSpeed defaults as a priority or the registry - HKEY_LOCAL_MACHINE\SOFTWARE\IBM\ADSM\CurrentVersion\BackupClient)

@tsmexpdatelower

For TSM archives, it specifies the oldest expiration date and time of where to start the list. The format is yyyy-mm-dd hh:mm:ss.

@tsmexpdateupper

For TSM archives, it specifies the most recent expiration date and time of where to stop the list. The format is yyyy-mm-dd hh:mm:ss.

@tsmfilespace

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

@tsmhighlevel

Specifies the TSM high-level name. If you do not specify this parameter, LiteSpeed will retrieve all high levels from the TSM server.

NOTES:

  • This parameter supports wild cards (e.g. MyLowLevelName*, MyHighLevelName*).
  • You do not necessarily have to have both the @tsmhighlevel and @tsmlowlevel parameters in one query.

@tsminsdatelower

For TSM archives, it specifies the oldest insertion date and time of where to start the list. The format is yyyy-mm-dd hh:mm:ss.

@tsminsdateupper

For TSM archives, it specifies the most recent insertion date and time of where to stop the list. The format is yyyy-mm-dd hh:mm:ss.

@tsmlowlevel

Specifies the TSM low-level name. If you do not specify this parameter, LiteSpeed will retrieve all low levels from the TSM server.

NOTES:

  • This parameter supports wild cards (e.g. MyLowLevelName*, MyHighLevelName*).
  • You do not necessarily have to have both the @tsmhighlevel and @tsmlowlevel parameters in one query.

@tsmsortbylowlevel

Sorts the results by the low level name. This argument accepts one of the following values:

  • 0—False (default)
  • 1—True

@tsmsortbypit

Sorts the results by the point-in-time date. It accepts one of the following:

  • 0—False (default)
  • 1—True

@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.

Example

exec master.dbo.xp_view_tsmcontents
@tsmclientnode = 'ClusterGroup'
, @tsmclientownerpwd= 'test16'
, @tsmfilespace= 'SLS_Mar'
, @tsmconfigfile= 'C:\Program Files\Tivoli\tsm\baclient\dsm.opt'
, @tsmarchive=1
, @tsminsdatelower='2006-03-15 13:00:00'
, @tsminsdateupper='2006-03-16 18:00:00'
, @tsmexpdatelower='2007-02-14 09:00:00'
, @tsmexpdateupper='2007-03-17 18:00:00'

Result Set

xp_view_tsmcontents displays the following information:

Column Name

Data Type

Description

File Space

Nvarchar(128)

TSM File Space.

High Level

Nvarchar(128)

TSM High Level.

Low Level

Nvarchar(128)

TSM Low Level.

Management Class

Nvarchar(128)

TSM Management Class.

TsmPointInTime

Nvarchar(128)

The TSM retention point-in-time date for restore.

FileNumber

Int

Number of the Backup within the LiteSpeed Backup device.

BackupFormat

Nvarchar(128)

Reserved field. Returns 1.

Guid

Uniqueidentifier

Backup GUID, uniquely identifies LiteSpeed backup sets.

BackupName

Nvarchar(128)

Backup set name.

BackupDescription

Nvarchar(128)

(For archives only) The description (if any) that the user passed in on the @desc parameter on the original backup.

BackupType

Nvarchar(128)

Backup type:

  • 1—Database

  • 2—Transaction Log

  • 4—File

  • 5—Differential Database

  • 6—Differential File

  • 7—Partial
  • 8—Partial Differential

ExpirationDate

Datetime

(For archives only) The expiration date and time that TSM assigned the archived object based on the management class policy of the management class assigned to the archived object.

Compressed

Tinyint

0 = No compression.
1 = Compressed

Position

Smallint

Position of the backup set in the volume (for use with the FILE = option).

DeviceType

Tinyint

Virtual Device
> 7 = Logical
107 = Physical

UserName

Nvarchar(128)

Username that performed the backup operation.

ServerName

Nvarchar(128)

Name of the server that wrote the backup set.

DatabaseName

Nvarchar(128)

Name of the database that was backed up.

DatabaseVersion

Int

Version of the database from which the backup was created.

DatabaseCreationDate

Datetime

Date and time the database was created.

BackupSize

Numeric (20,0)

Size of the backup, in bytes.

FirstLsn

Numeric (25,0)

Log sequence number of the first transaction in the backup set. NULL for file backups.

LastLsn

Numeric (25,0)

Log sequence number of the last transaction in the backup set. NULL for file backups.

CheckpointLsn

Numeric (25,0)

Log sequence number of the most recent checkpoint at the time the backup was created.

DifferentialBaseLsn

Numeric (25,0)

Log sequence number of the most recent full database backup.

BackupStartDate

Datetime

Date and time that the backup operation began.

BackupFinishDate

Datetime

Date and time that the backup operation finished.

SortOrder

Smallint

Server sort order. This column is valid for database backups only. Provided for backward compatibility.

CodePage

Smallint

Server code page or character set used by the server.

CompatibilityLevel

Tinyint

Compatibility level setting of the database from which the backup was created.

SoftwareVendorId

Int

Software vendor identification number. For SQL Server, this number is 4608 (or hexadecimal 0x1200).

SoftwareVersionMajor

Int

Major version number of the server that created the backup set.

SoftwareVersionMinor

Int

Minor version number of the server that created the backup set.

SoftwareVersionBuild

Int

Build number of the server that created the backup set.

MachineName

Nvarchar(128)

Name of the server that wrote the backup set.

BindingId

Uniqueidentifier

Binding ID for the database.

RecoveryForkId

Uniqueidentifier

ID for the current recovery fork for this backup.

Encryption

Int

Indicates if backup is encrypted:

  • 0—not encrypted
  • 1—encrypted
IsCopyOnly Bit

Indicates if the backup is copy-only:

  • 1—A copy-only backup

Note: A copy-only backup does not impact the overall backup and restore procedures for the database.

Returns

0 (success) or non-zero (failure).

To capture the output message, run the following:

declare @rmsg varchar(999)
exec master..<procedure_name> <arguments>, @resultmsg=@rmsg output
select @rmsg

To capture the output message and the result code, run the following:

declare @rc int
declare @rmsg varchar(999)
exec master..<procedure_name> <arguments>, @resultmsg=@rmsg output, @resultcode=@rc output
select @rc, @rmsg

 

Related Topic

Documentos relacionados

The document was helpful.

Seleccionar calificación

I easily found the information I needed.

Seleccionar calificación