DB2REMOTE identifiers

You can use DB2REMOTE identifiers to access objects on remote storage.

Command syntax

Read syntax diagramSkip visual syntax diagramDB2REMOTE://alias/container/object

Command parameters

All three parameters are required for the remote identifier to work correctly, including the forward-slash separators.
alias
The name of a storage access alias, created by using the CATALOG STORAGE ACCESS command.
container
The name of the bucket or container to be accessed on the remote storage.
object
The name of an object to be accessed on the remote storage.

Usage notes

  • A storage access alias can contain values for a container or an object:
    • If a container or object is specified in the DB2REMOTE identifier, then it overrides the corresponding value from the alias.
    • If a container or object is specified as the empty string in the DB2REMOTE identifier, then the corresponding value, or values, from the alias is used.
    • If a container or object is specified as the empty string in the DB2REMOTE identifier, and no corresponding value, or values, exist in the alias, then the DB2REMOTE identifier is invalid and operations using it fail.
  • An object is treated as an object name prefix by some commands.
  • An object can contain characters that are not typically seen in file names on local file systems. For example, “this/is/an/object!” is a valid object name. The forward-slash characters are not treated as path separators because object storage is non-hierarchical. Instead, the forward-slash characters are treated as any other characters in the object name. For more information on object naming, see Creating object key names.

Examples

The following example shows the command syntax for a typical use of the DB2REMOTE identifier. The alias and object values are specified, and the container value is the empty string. The container value cataloged as part of the alias is used. The object name is temp/backups:
BACKUP DATABASE TESTDB TO
        DB2REMOTE://myAlias//temp/backups
The following example shows the command syntax when using a container override. The container named special is used and overrides the container value cataloged as part of the alias. The object name is temp/backups:
BACKUP DATABASE TESTDB TO
        DB2REMOTE://myAlias/special/temp/backups
The following example shows the syntax when the container and object values that are cataloged as part of the alias are used:
LOAD FROM DB2REMOTE://myAlias//
        OF DEL