Remote storage requirements

Remote storage aliases are supported by a select number of Db2® commands for accessing data on the IBM® Cloud Object Storage or the Amazon Simple Storage Service (S3). In order to use the select Db2 commands, several configurations to the system are required to account for this feature.

Attention: In Db2 11.5 Mod Pack 1 or later versions, remote storage aliases are supported by a select number of Db2 commands for accessing data on Microsoft Azure Blob Storage.

Supported platforms and prerequisites

This feature is supported on SuSe and RHEL Linux® distributions (x86_64 platform) only.

The IBM Cloud® Object Storage and Amazon S3 providers are supported for all commands that are enabled for remote storage. The Microsoft Azure object storage provider is only supported for the CREATE EXTERNAL TABLE command, including the ability to query the data.

Local object storage that can be accessed via the S3 protocol are also supported.

The following software packages must be installed:
  • libcURL, version 7.29.0 or later.
  • libxml2, version 2.9.1 or later.

Local staging path

When the DB2_ENABLE_COS_SDK registry variable is set to OFF, remote storage communication with cloud object storage uses the legacy libcurl method, which requires a local staging path to hold temporary files in the following situations:
  • Downloading an object from a remote storage server
  • Uploading an object from a local file system to a remote storage server
The default staging path is in <instance_directory>/sqllib/tmp/RemoteStorage.xxxx, where xxxx refers to the database partition number.
The default staging path can be configured by the DB2_OBJECT_STORAGE_LOCAL_STAGING_PATH variable. The size of the file system for this staging path must be sufficient to hold the working files of the utility, such as the source files for Load and Ingest operations, images for Backup and Restore operations, and log files for Log Archive and Retrieve operations.
  • For BACKUP operations, each backup session to the remote storage has a maximum size of 5 GB, which can produce a total database backup image size of 5 TB.
When the DB2_ENABLE_COS_SDK registry variable is set to ON, the following settings apply to the local staging space:
  • The local staging space is not needed for BACKUP operations. The maximum size of each backup session is determined by multiplying the value of the database manager configuration parameter MULTIPARTSIZEMB by the maximum number of parts that are allowed by the Cloud Object Storage provider.
  • The local staging path is needed for RESTORE operations. This location is needed to temporarily store the downloaded backup image.
  • The local staging path is needed for log archive and retrieve operations. This location is used to temporarily store the log files being uploaded or downloaded.

Compressed input data

Users are able to load directly from compressed input data files stored in the supported remote storage.

When the DB2_ENABLE_COS_SDK registry variable is set to OFF, the following common compression formats are supported:
  • *.gz - created by gzip utility
  • *.zip - created by zip utility
Note: support for .zip is deprecated and will be removed in a future release
When the DB2_ENABLE_COS_SDK registry variable is set to ON, the following common compression formats are supported:
  • *.gz - created by gzip utility

It is required that the compressed file name has the same name as the original file, with the additional .zip or .gz file extension. For example, if a file has the name db2load.txt, it is expected that the compressed file name is db2load.txt.zip or db2load.txt.gz.