Migrate Data Using Transportable Tablespaces

Transportable Tablespaces enable efficient migration of large volumes of data by moving tablespaces, including their data and metadata, from a source database to a target database without requiring full data export and import.

About Transportable Tablespaces

Transportable Tablespaces is an Oracle AI Database feature that enables you to move large volumes of data between databases quickly and efficiently.

You can use Transportable Tablespaces with Autonomous AI Database to efficiently move large data sets by transporting entire user-managed tablespaces from other Oracle AI Databases, such as an on-premises Oracle AI Database or an Oracle AI Database on the cloud., even across platforms. Migrating complete tablespaces, instead of individual objects, reduces migration time and minimizes downtime compared to object-level export and import. This feature is especially useful for data warehouse migrations, historical data archiving, and database upgrades.

Transportable Tablespaces supports both encrypted and non-encrypted tablespaces, including management of Transparent Data Encryption (TDE) wallets when applicable. Because Autonomous AI Database supports only bigfile tablespaces, any smallfile tablespaces from the source are automatically converted to bigfile tablespaces during the transport operation.

The following are the key benefits of Transportable Tablespaces:

Prerequisites

Lists the prerequisites for transporting tablespaces across databases.

See Limitations on Transportable Tablespaces for a list of additional restrictions.

Migration Workflow Using Transportable Tablespaces

This section outlines the steps to perform a Transportable Tablespaces migration from a non-Autonomous AI Database to Autonomous AI Database.

You cannot directly transport tablespaces from a non-Autonomous AI Database to an Autonomous AI Database. To transport tablespaces, first back up the tablespaces from the source database to the intermediate storage location, OCI Object Storage. The intermediate storage stores the data and metadata backup, and Transparent Data Encryption (TDE) wallet files if encryption is enabled on the transported tablespaces. After the backup, restore the data from the intermediate storage to the target Autonomous AI Database.

The workflow for transportable tablespaces includes the following steps:

  1. Prepare the source database host for transportable tablespaces

    Before you perform a transportable tablespace operation, complete several setup tasks to ensure that the source database environment is properly configured:

    These preparatory steps ensure the required connectivity, authentication, and storage configurations for a secure transportable tablespace operation.

    See Prepare the Source Database Host Environment for more information.

  2. Run the backup utility on the source

    Use the Oracle-provided Transportable Tablespace Backup Utility, a Python-based script, to create and upload tablespace backup from the source database. This utility:

    • Validates source environment readiness.

    • Uses Oracle Data Pump export to export the metadata.

    • Uses Oracle Recovery Manager (RMAN) to back up tablespace data.

    • Packages outputs, RMAN backup pieces, metadata, TDE wallet files, if applicable, and certificates into a compressed tar archive (the Transportable Tablespaces metadata bundle).

    • Securely uploads the bundle to the designated Object Storage bucket.

    • Returns a URL to the uploaded bundle, to be used during the restore process.

    • The utility also invokes the Oracle AI Database Cloud Backup Module for OCI to create a wallet for API signing keys and required certificates, ensuring secure access to OCI Object Storage.

    • Both incremental and non-incremental backups are supported. Non-incremental backup is a full, one-time backup with tablespaces in read-only mode. Incremental backups start with a level 0 backup, followed by one or more incremental (level 1) backups and a final incremental backup with tablspaces in read-only mode. The restore workflow on the target Autonomous AI Database depends on the backup type you choose.

    See Perform Tablespace Backup on the Source Database: Steps and Example for more information.

  3. Import tablespaces to Autonomous AI Database

    The process for restoring transportable tablespaces on the target Autonomous AI Database depends on the type of tablespace backup on the source database:

    • Non-incremental backups

      Apply the non-incremental backup during the Autonomous AI Database provisioning. This restores data and imports metadata in one step.

    • Incremental backups

      Begin by creating a level 0 incremental backup on the source database. Restore the level 0 tablespace backup from the source database when provisioning the target Autonomous AI Database. After the database is created, apply subsequent incremental level 1 backups in sequence. During this process, only the RMAN backup pieces are copied to the target database. The associated metadata is imported after the final incremental backup is applied on the target Autonomous AI Database.

    See Transport Tablespaces to Autonomous AI Database for more information.

Prepare the Source Database Host Environment

Describes the steps required to set up the environment before performing Transportable Tablespace operations.

Create a Directory on the Source Database

Shows the steps to create a project directory on the host running the source database. This directory serves as a staging area for the transportable tablespaces related files.

Following are the steps to create a project directory:

  1. Log in to the source database host where the source Oracle AI Database is running.

  2. Identify an appropriate location with sufficient space to store the required files.

  3. Create the Directory. Run the following command to create a new project directory:

    mkdir -p /u01/tts_project
  4. Grant appropriate permissions on the directory. For example:

    chmod 755 /u01/tts_project
  5. Navigate to the Directory. For example:

    cd /u01/tts_project

Download and Setup Transportable Tablespaces Backup Utility

Describes the Oracle-provided Transportable Tablespaces Backup Utility and related files, and how to download them from GitHub repository.

Oracle provides five individual files; there is no bundled installer. Download all five files separately into the same directory, for example the previously created tts_project directory on the source database host. The following files are provided, each serving a specific purpose:

You can obtain the latest Transportable Tablespaces Backup Utility and related files from GitHub packages. Refer to the Transportable-Tablespaces-Backup-Utility repository for download instructions and access to the files.

Before you run tts-backup.py, configure the tts-backup-env.txt file. The Transportable Tablespaces Backup Utility reads this file to perform the backup; missing or incorrect parameter values will cause the backup to fail.

The following tables lists each parameter with its description and an example value:

Parameter Name Description Example
PROJECT_NAME Name of transport tablespace project. tts_project
DATABASE_NAME Name of the source database. tts_db
TABLESPACES

A comma separated list of tablespace names.

This parameter is optional and defaults to all user defined tablespaces..

emp_tablespace, dept_tablespace, cust_tablespace
SCHEMAS

A comma separated list of schema names.

This parameter is optional and defaults to all non-SYS schemas.

SALES, HR

Database connection parameters:

Parameter Name Description Example
HOSTNAME Host name of the source database. db1
LSNR_PORT Listener port of the source database. 1521
DB_SVC_NAME Database service name to connect to the source database. tts_db
ORAHOME The Oracle home directory value on the server that contains the source database. /opt/oracle/product/19c/dbhome_1
DBUSER Username to connect to the source database. The provided username must have the SYSDBA privileges. bkp_user
DBPASSWORD

Password to connect to the source database.

The password provided will be ignored; you will be prompted to enter the password manually when running the backup utility script.

NA
DB_VERSION The source database version. The supported versions are Oracle Database 19c or higher. 19c

OCI Object Storage Service (OSS) parameters: These parameters are required only when using OCI Object Storage Service (OSS) to store the backup and metadata.

Parameter Name Description Example
TTS_BACKUP_URL OCI Object Storage bucket URI: destination to store the data backup. https://objectstorage.us-ashburn-1.oraclecloud.com/n/namespace/b/bucketname
TTS_BUNDLE_URL OCI Object Storage bucket URI: destination to store the metadata backup. https://objectstorage.us-ashburn-1.oraclecloud.com/n/namespace/b/bucketname
OCI_INSTALLER_PATH

The oci_install.jar location to download the wallet and import all certificates.

This parameter is optional and defaults to the current directory.

/home/oracle/opc_installer/oci_installer/oci_install.jar
CONFIG_FILE Path to config file snippet which includes the basic authentication information. /home/oracle/OCI_CONFIG/config
COMPARTMENT_OCID Compartment OCID of OCI Object Storage buckets. ocid1.compartment.oc1..xxxxx
OCI_PROXY_HOST

HTTP proxy server

This parameter is optional.

proxy.company.com
OCI_PROXY_PORT

HTTP proxy server connection port

This parameter is optional.

80

Transparent Data Encryption (TDE) keys parameters: This input is required only if one or more of the tablespaces are encrypted using Transparent Data Encryption (TDE).

Parameter Name Description
TDE_WALLET_STORE_PASSWD

Transparent Data Encryption (TDE) wallet store password

The password provided will be ignored; you will be prompted to enter the password manually when running the backup utility script.

Final backup parameters:

Parameter Name Description Example
FINAL_BACKUP

Specifies a non-incremental operation or to indicate last backup is an incremental operation.

Specify TRUE to perform a full (non-incremental) backup.

Specify FALSE to perform an incremental backup.

The last backup operation in the incremental sequence must be run with FINAL_BACKUP=TRUE to ensure that the metadata is exported.

TRUE

(Optional) Performance parameters:

Parameter Name Description
PARALLELISM Number of channels to be used for backup.
CPU_COUNT Specifies the number of CPUs to use from the instance when the PARALLELISM parameter is not provided.

Install the Oracle AI Database Cloud Backup Module for OCI

Describes how to download and install the Oracle AI Database Cloud Backup Module for OCI on your database server.

The Oracle AI Database Cloud Backup Module for OCI enables you to perform backup and restore with OCI Object Storage using Oracle Recovery Manager (RMAN). Installing and using the module requires your Oracle Cloud credentials. Installed module is used by Transportable Tablespaces Backup Utility to securely store certificates and authentication keys in an Oracle wallet. The wallet is used to perform RMAN backup and restore with OCI Object Storage. Download the module from Oracle Technology Network (OTN), then refer to Installing the Oracle AI Database Cloud Backup Module for OCI for installation steps.

Configure Storage for Transport

Shows the steps to configure storage and access for Transportable Tablespace operations.

To perform a Transportable Tablespace backup, you must configure the storage to store the backup files and associated metadata. The storage location serves as an intermediate repository for the transport. You need to create two Object Storage buckets \<tts_data_bucket\> and \<tts_metadata_bucket\>.

Configure OCI Object Storage bucket

  1. Sign in to the OCI Console

    Log in to the Oracle Cloud Console.

    See Signing In to the OCI Console for more information.

  2. Creating Object Storage Buckets

    See Creating an Object Storage Bucket for detailed steps to create Object Storage buckets.

Perform Tablespace Backup on the Source Database: Steps and Example

The following list of tasks summarizes the process of transporting a tablespace. Details for each task are provided in the subsequent example.

Example

The procedures for transporting a tablespace are demonstrated in the following example. This example assumes the existence of the data files and tablespaces shown below:

Tablespace Datafile
SALES_1 /u01/app/oracle/oradata/salesdb/sales_101.dbf
SALES_2 /u01/app/oracle/oradata/salesdb/sales_201.dbf

Task 1: Verify that the tablespaces are self contained

There may be logical or physical dependencies between objects in the transportable set and those outside of the set. You can only transport tablespaces that are self-contained. Some examples of self contained tablespace violations are:

To determine whether a set of tablespaces is self-contained, run invoke the TRANSPORT_SET_CHECK procedure in the Oracle supplied package DBMS_TTS. For example:

EXECUTE DBMS_TTS.TRANSPORT_SET_CHECK('sales_1,sales_2', TRUE);

The package verifies that all dependent objects (such as indexes, constraints, or partitions) exist entirely within the set of tablespaces being transported. No cross-tablespace dependencies exist that would prevent successful transport.

After you run the procedure, query the TRANSPORT_SET_VIOLATIONS view to display any violations. For example:

SELECT * FROM TRANSPORT_SET_VIOLATIONS;

This example lists violations found during a transport set check.

Task 2: Create the backup

This task assumes that all required prerequisites for this step have already been completed. See Prepare the Source Database Host Environment for more information.

Transport Tablespaces to Autonomous AI Database

Describes how to migrate data to Autonomous AI Database using Transportable Tablespaces.

The process for migrating Transportable Tablespaces on the target Autonomous AI Database depends on whether the tablespace backup from the source database is incremental or non-incremental.

Note:

Transporting tablespaces to Autonomous AI Database is supported only when provisioning a new Autonomous AI Database instance.

Since the Transportable Tablespace metadata bundle URL must be downloaded from OCI Object Storage, you need to set up dynamic groups and policies that allow access to OCI Object Storage using a resource principal. Configuring a resource principal is required to securely download the Transportable Tablespaces metadata bundle on the target Autonomous AI Database. See Prerequisites for more information.

Transport using a non-incremental tablespace backup of the source database

With a non-incremental (full) source tablespace backup, the metadata bundle includes Data Pump export of the tablespace and schema metadata. During the provisioning of the Autonomous AI Database, you provide the metadata bundle URL (in the Object Storage bucket URI of the tablespace zip file text box in the Migration section under Advanced Options) to import the tablespaces from the source tablespace backup. The provisioning process restores the tablespace backup and imports the tablespace and schema metadata into your database.

For example:

Description of adbs_transportable_tablespace_provisioning.png follows

Description of the illustration adbs_transportable_tablespace_provisioning.png

For detailed steps to provision an Autonomous AI Database, see Provision an Autonomous AI Database Instance.

Transport using an incremental tablespace backup of the source database

Before you transporting restoring an Autonomous AI Database, note the following:

Provision the Autonomous AI Database Using the Level 0 Backup

Begin by provisioning your Autonomous AI Database with the level 0 tablespace backup the source database. This operation provisions the database and restores the initial level 0 backup on the database. See Provision an Autonomous AI Database Instance for more information.

Apply Subsequent Incremental (level 1) Backups

After the database is provisioned and the level 0 backup of the source tablespaces is restored, apply any incremental (level 1) backups in sequence.

Steps to update your target Autonomous AI Database with incremental backups:

Limitations on Transportable Tablespaces

Lists the limitations on transportable tablespace.

Note the following notes and limitations for transportable tablespaces: