サポートと今すぐチャット
サポートとのチャット

LiteSpeed for SQL Server 8.9.8 - Integration with TSM Guide

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

関連ドキュメント

The document was helpful.

評価を選択

I easily found the information I needed.

評価を選択