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.

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.

Scope

The SYSPROC.LOGICAL_BACKUP_DETAILS() returns a list of backup images (timestamps) that are available in the specified media or path.

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( -path list-of-path(s)-tsm-s3s3-options-coscos-options -errorlogdir <path>-media-connection-timeout <milliseconds>-keeplogson_errorall_in_errorlogdir)
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>
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>

Command parameters

-schema SCHEMANAME
Schema to be backed up. Multiple schema names must be separated by space.
-path
Specifies a list-of-path(s) 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.
-tsm
Backup image is to be stored in IBM Spectrum Protect server. Mutually exclusive with path and s3 options.
-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 - remove all diagnostic log files.
all_in_errorlogdir - preserve all diagnostic log files in errorlogdir. This is the default for path media.
Note: On failure, all diagnostic log files are preserved irrespective of the value of -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