LOGICAL_BACKUP_DETAILS stored procedure - for generating a list of the logical backup images stored on a specified media

The LOGICAL_BACKUP_DETAILS stored procedure returns list of backup images (timestamps) on a specified path or media.

Syntax

The stored procedure returns a list of timestamp labels that are available on a specified path or media. By default, the EXECUTE permission is granted to PUBLIC.

Read syntax diagramSkip visual syntax diagramLOGIAL_BACKUP_DETAILS('-pathlist-of-path(s)remote-storage-tsm-s3s3-options-coscos-options-errorlogdir <path>-media-connection-timeout <milliseconds>-keeplogsON_ERRORALL_IN_ERRORLOGDIR')
s3-options
Read syntax diagramSkip visual syntax diagrams3-options-bucket-url <bucket-url>-access-key <access-key>-secret-key <secret-key>-default-region <region>-endpoint <endpoint>-multipart-size-mb <multipart size mb>
cos-options
Read syntax diagramSkip visual syntax diagramcos-options-bucket-url <bucket-url>-access-key <access-key>-secret-key <secret-key>-default-region <region>-endpoint <endpoint>-multipart-size-mb <multipart size mb>

Authorization

The EXECUTE authority is required on the SYSPROC.LOGICAL_BACKUP_DETAILS procedure to run the LOGICAL_BACKUP_DETAILS stored procedure. By default, this authority is granted to PUBLIC.

Backup images created by using the -path option are owned by the connected user. This includes the top folder, all sub-folders, and all files.

Procedure parameters

-path
Specifies a list-of-path(s) or remote-storage for where the backup image is stored. This option is mutually exclusive with the -tsm, -s3 and -cos options.
list-of-path(s)
One or more path strings. If multiple path strings are specified, they must be separated by a space. In a DPF environment, each path has to be shared by cross-mounting in the same location on all hosts.
remote storage
A string starting with the keyword DB2REMOTE can be used to specify a remote storage alias. For more information on defining a DB2REMOTE alias, see CATALOG STORAGE ACCESS. Only one DB2REMOTE string can be specified using the -path option.
Important: The general syntax for using the remote storage alias is
DB2REMOTE://<alias>/<container>/<object>
where <object> is any string representing the name of the object, or file, on the remote storage. For the LOGICAL_BACKUP_DETAILS() stored procedure, the name of the object string must be DB2. If no name is specified, the value defaults to DB2.
-tsm
Backup image is to be stored in IBM® Storage Protect, formerly Tivoli Storage Manager (TSM) server. Mutually exclusive with path and s3 options.
Note: IBM Storage Protect is the new product name for Tivoli Storage Manager (TSM).
-s3
Backup image is to be stored in S3 cloud. Mutually exclusive with -path, tsm, and -cos options. -bucket-url, -access-key, -secret-key, and either -default-region or -endpoint options are mandatory. If both -default-region and -endpoint are specified, then region in -endpoint must match one in -default-region. Data is sent directly to cloud, no local temp storage is required.
-cos
Backup image is to be stored in IBM COS. Mutually exclusive with -path, -tsm, and -s3 options. -bucket-url, -access-key, -secret-key, and -endpoint options are mandatory. If specified, -default-region is ignored. Data is sent directly to cloud, no local temp storage is required.
-errorlogdir <path>
Path (on server) where diagnostic log files will be saved to. Default is sqllib/tmp/bnr/logs subject to extbl_strict_io and extbl_location configuration parameters.
-keeplogs {ON_ERROR | ALL_IN_ERRORLOGDIR}
Indicates how diagnostic log files are to be handled after a successful operation.
ON_ERROR
Removes all diagnostic log files. This is the default setting.
ALL_IN_ERRORLOGDIR
Preserves all diagnostic log files in the specified errorlogdir location.
Note: On failure, all diagnostic log files are preserved irrespective of the value of the -keeplogs option.
-media-connection-timeout <milliseconds> (optional)
Maximum time (in milliseconds) to wait before TSM, S3 or IBM COS connection timeout.
-bucket-url <bucket-url>
URL of the cloud bucket.
-access-key <access-key>
Access key id for the bucket.
-secret-key <secret-key>
Secret access key for the bucket.
-default-region <region>
Default region of the bucket.
-endpoint <endpoint>
Gateway endpoint that connects to either Amazon S3 or IBM COS. If both -default-region and -endpoint are specified, then region in -endpoint must match one in -default-region.
-multipart-size-mb <multipart size mb>
Value (in MB) of -multipart-size-mb. Default is 105.

New sqlcodes

The following example shows an SQL1797N message that is returned when a LOGICAL_BACKUP_DETAILS() request fails:
SQL1797N The "SYSPROC.LOGICAL_BACKUP_DETAILS" utility has failed with error 
"Valid path required". SQLSTATE=5UA0Q