Retrieves TSM specific information and backup header information for the given LiteSpeed backup.
This topic covers:
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']
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>
Specifies a description to filter the returned results to those that match the pattern.
NOTE: @desc is only supported if @TSMBriefList=0.
Specifies to store the backup as a TSM archive. This argument accepts one of the following values:
Returns a brief list. This argument accepts one of the following values:
NOTE: It is not needed for archives as they are only returned as a brief list.
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.
Specifies the TSM client owner user password. Not required, if specified in the options file or if backing up with the Passwordaccess Generate option.
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)
For TSM archives, it specifies the oldest expiration date and time of where to start the list.
For TSM archives, it specifies the most recent expiration date and time of where to stop the list.
Specifies the space on the TSM server that contains a group of files. It can be the drive label name or UNC name.
See also @tsmobject.
Specifies the TSM high-level name. If you do not specify this parameter, LiteSpeed will retrieve all high levels from the TSM server.
NOTES:
For TSM archives, it specifies the oldest insertion date and time of where to start the list.
For TSM archives, it specifies the most recent insertion date and time of where to stop the list.
Specifies the TSM low-level name. If you do not specify this parameter, LiteSpeed will retrieve all low levels from the TSM server.
NOTES:
Sorts the results by the low level name. This argument accepts one of the following values:
Sorts the results by the point-in-time date. It accepts one of the following:
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.
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'
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:
Shouldn't there be a 3? |
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. |
Position |
Smallint |
Position of the backup set in the volume (for use with the FILE = option). |
DeviceType |
Tinyint |
Virtual Device |
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:
|
IsCopyOnly | Bit |
Indicates if the backup is copy-only:
Note: A copy-only backup does not impact the overall backup and restore procedures for the database. |
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
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Nutzungsbedingungen Datenschutz Cookie Preference Center