Migrate to Autonomous AI Database

  • Oracle Zero Downtime Migration (ZDM) facilitates complex database migrations with maximum availability and minimal disruption. It follows Oracle Maximum Availability Architecture (MAA) best practices during migration. This topic describes how to use Oracle Zero Downtime Migration for migrations to Autonomous AI Database. The capability supports database movement across platforms and versions and enables deployment in multicloud environments.

    Target Environment: Autonomous AI Database

    Autonomous AI Database automatically manages provisioning, security, patching, and tuning. This automation reduces operational cost and helps prevent human error. When you deploy Autonomous AI Database on Oracle AI Database@Azure, it uses a native, low-latency connection to Azure cloud applications. This setup maintains performance and simplifies integration with other Azure cloud services.

    Key Benefits of Using Oracle Zero Downtime Migration for Autonomous AI Database Migrations

    Minimal/Zero Downtime Oracle Zero Downtime Migration uses Oracle Data Guard and Oracle GoldenGate to maintain synchronization between source and target, ensuring availability throughout the migration process.
    Automated Orchestration The utility provides a simplified, one-button experience by automating prevalidation checks, data transfer, and final cutover, therefore reducing manual effort and potential human error.
    Platform Flexibility Oracle Zero Downtime Migration supports migrations between identical or different database platforms and versions, allowing simultaneous modernization as part of the move.
    Cost Efficiency Oracle Zero Downtime Migration is available at no cost, helping you reduce overall migration project costs.
    Risk Reduction By following Oracle Maximum Availability Architecture (MAA) best practices and using automated validation, Oracle Zero Downtime Migration provides a reliable migration path.

    Supported Migration Workflows

    Oracle Zero Downtime Migration supports two workflows, giving you flexibility to choose the best option based on your availability requirements and the compatibility of your source and target environments.

    1. Logical Online Migration

      Downtime Profile: Minimal (near zero).

      Compatibility: Supports migrations between the same or different database versions and platforms.

      Process: This method uses Oracle Data Pump export and import to create the target database. An NFS file share can be provided by using Oracle Advanced Cluster File System (Oracle ACFS), an NFS server, Azure Files, or Azure NetApp to store the Data Pump dump files. Oracle GoldenGate keeps the source and target databases synchronized to achieve minimal downtime.

    2. Logical Offline Migration

      Downtime Profile: Offline (requires application downtime).

      Compatibility: Supports migrations between the same or different database versions and platforms.

      Process: This method uses Oracle Data Pump export and import to create the target database. An NFS file share can be provided by using Oracle Advanced Cluster File System (Oracle ACFS), an NFS server, Azure Files, or Azure NetApp to store the Data Pump dump files.

    For more information on Oracle Zero Downtime Migration, see the following resources:

  • In multicloud environments, you can transfer data between cloud providers or store data in one environment while you query or access it from another. The DBMS_CLOUD PL/SQL package in Oracle AI Database enables direct access to object storage services, including Oracle Cloud Infrastructure Object Storage and Azure Blob Storage. You can query data by using external tables or load data directly into database tables.

    This document provides a step-by-step guide on accessing and importing data from Azure Blob Storage into an Oracle AI Database.

    Solution Architecture

    This solution demonstrates how Azure Blob Storage can be used as a landing zone for backups and files.

    The Oracle DBMS_CLOUD package lets you query data directly from Azure Blob Storage buckets (Parquet, CSV, JSON, etc.) as external tables without moving it, join it in real time with Oracle tables for unified analytics, bulk import files into Oracle AI Database efficiently with parallel loading, minimize data duplication and costs in multicloud setups, and support hybrid scenarios like blending ERP data with Azure-stored logs, IoT streams, or ML features for faster insights and reporting.

    The architecture illustrates a workflow in which the source is an Oracle AI Database running on Linux or Autonomous AI Database, and the target is an Oracle AI Database environment running on Azure infrastructure (Oracle AI Database@Azure). Azure Blob Storage is used by both the source and target database systems, enabling RMAN backups and Data Pump exports to be written once and restored directly, without additional file transfer steps.

    By leveraging Azure Blob Storage as shared storage, migration workflows benefit from a managed service that supports movement of data with ease.

    This screenshot shows the architecture diagram.

    Prerequisites

    1. Oracle Database Environment
      • Source: An Oracle AI Database platform, such as Autonomous AI Database, Oracle RAC, or a standalone Oracle AI Database instance on Linux.
      • Target: Autonomous AI Database running on Oracle AI Database@Azure.
    2. Azure Blob Storage Container
      • A container that contains the data files, such as a Data Pump dump file.
    3. Network Connectivity
      • For Oracle AI Database@Azure: The service supports internal connectivity within the same Azure region and virtual network by default, often by using private endpoints for performance and security.
      • For on premises or other OCI based sources: Use internet connectivity or a private link by using Oracle Interconnect for Microsoft Azure, if applicable.
    4. Credentials
      • An Azure Storage account name and access key with permissions to access the container.
      • Alternatively, use an Azure service principal for improved security in supported setups.
    These are the steps for configuration.
    Note

    Ensure that you have Azure Blob Storage configured with a private endpoint.
    1. Assign an Azure Role for Access to Blob Data in a Storage Account

      To grant the required roles to access data in Azure Blob Storage, see the Assign an Azure role for access to blob data documentation. For example, you can assign the roles by using the Azure CLI, as shown in the following example:

      
      # replace the placeholder values in brackets with your own values
      az role assignment create \
          --role "Storage Blob Data Contributor" \
          --assignee <email> \
          --scope "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>/blobServices/default/containers/<container>"
    2. Copy the Access Key of Your Storage Account
      1. Open your storage account page.
      2. Select Access keys under Security + networking.
      3. Select Show keys.
      4. Copy the Storage account name and Key information. Store them in a secure location. Then, you can select the Hide button.
        Note

        You need these keys when you run the CREATE_CREDENTIAL command on the database.
        The screenshot shows how to copy the access key of your storage account.
    3. Obtain Your Azure Blob Storage URL

      To obtain the direct URL of the file stored in your Azure Blob Storage container for importing into Oracle AI Database, complete the following steps:

      1. In the Azure portal, open your storage account.
      2. Select Containers in the left menu.
      3. Select the target container.
      4. Select the specific object or file.
      5. Copy the value shown as Object URL.
        Note

        You need this URL for the HOST parameter in the DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE command.
        The screenshot shows how to obtain your Azure Blob Storage URL.
    4. In this example, the data.csv file is a sample file that contains two rows of comma separated values:
      SNO NAME City
      1 Alice Chicago
      2 Bob New York
      3 Charlie San Francisco
      4 Diana Austin

    Connect the Autonomous AI Database to Azure Blob Storage

    1. Obtain the Azure Blob Storage Fully Qualified Domain Name (FQDN)
      Note

      Ensure that you have a running Azure Blob Storage configured with a private endpoint.
      1. From the Azure portal, navigate to Storage accounts. and then select your account from the list.
      2. From the left menu, expand the Security + networking section, and then select Networking.
      3. Select the Private endpoints tab and select your private endpoint from the list.
      4. From the left menu, expand the Settings section and then select DNS configuration.
      5. From the Network interface section, obtain the FQDN and IP address information. Record these information as they are required while creating Private DNS Zone in OCI.The screenshot shows how to obtain the Fully Qualified Domain Name (FQDN).
    2. Configure the OCI DNS
      1. From the Azure portal, navigate to your resource. From the Overview section, select the Go to OCI link.This screenshot shows how to navigate to OCI from Azure portal.
    3. Create Private DNS Zone
      Create a private DNS zone that matches the fully qualified domain name of the NFS share in Azure. When Autonomous AI Database resolves that fully qualified domain name, it queries the VCN resolver, which checks the zones in the private view. The zone includes an A record that maps to the private endpoint for the Azure NFS storage.
      Note

      Use the FQDN and IP address that you copied previously to create your Private DNS zone.
      1. From the OCI console, select Networking and then select Virtual cloud networks.
      2. From the list, select your Virtual Cloud Network (VCN) that you are using.
      3. From the Details tab, select the DNS Resolver link.
      4. From the Private resolvers page, select the Details tab and then select the Default private view link.
      5. From the Private views page, select the Private zones tab and then select the Create zone button. For example, blob.core.windows.net.
      6. After creating a private zone, select the Records tab and then add a record. For example, demoforblob. Ensure that the record points to the actual IP address of Azure Blob Storage.
      7. Publish the changes.
      8. Update the Network Security Group (NSG) in OCI to allow traffic from the VPC where the Azure Blob Storage resides.
      9. After you complete the configuration, the fully qualified domain name from the OCI database resolves to the Azure Blob Storage endpoint.
    Complete the following steps in OCI:
    1. Create the credentials in the Oracle AI Database:
      1. Ensure that you have a successful connection from an Oracle AI Database client or tool to Autonomous AI Database. For more information, see Connect - Autonomous AI Database (Serverless).
      2. Make sure that all outbound connections to the target host comply with the private endpoint egress rules and are limited by those rules.
        ALTER DATABASE PROPERTY SET ROUTE_OUTBOUND_CONNECTIONS =  ‘ENFORCE_PRIVATE_ENDPOINT’;
      3. Add the Azure Blob Storage FQDN to the Access Control List (ACL).
      4. Use the DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE procedure to add an Access Control Entry (ACE) for the network host. Below is an example to replace it with your Azure Blob Storage endpoint from above (FQDN).
        
        BEGIN DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(  
        
        host => 'demoforblob.blob.core.windows.net',  
        
        ace  =>  xs$ace_type(privilege_list => xs$name_list('connect', 'resolve'),
        
        principal_name => 'ADMIN',  
        
        principal_type => xs_acl.ptype_db));
        
        END;
      5. Run the appropriate DBMS_CLOUD.CREATE_CREDENTIAL statement (or similar procedure) to register credentials for Azure Blob Storage access. Make sure to provide the Access Key from above in the credential parameters.
        
        BEGIN
            DBMS_CLOUD.CREATE_CREDENTIAL(
                credential_name => '<Credential_Name>',
                username => '<Storage_Account_Name>',
                password => '<Key>'
            );
        END;
        Replace the placeholders with your values:
        • <Credential_Name>: A name for the credential in the database.
        • <Storage_Account_Name>: Your Azure Storage account name.
        • <Key>: The access key for the Azure Storage account.
    2. Test the access to Azure Blob Storage:
      1. To verify that your Oracle AI Database can access the Azure Blob Storage container, list the objects inside it by using the LIST_OBJECTS function in the DBMS_CLOUD package.
      2. Use the credential name that you created in step 1 and the container location URL that you obtained previously.
      3. Make sure to omit the specific object name at the end of the URL.
        select * from dbms_cloud.list_objects('AZURECRED','https://demoforblob.blob.core.windows.net/demoblob/');
    Importing Data
    1. Import the data from .csv file.
      1. To import the data, use the COPY_DATA procedure of the DBMS_CLOUD package.
        create table mytab (id number, name VARCHAR2(64), city VARCHAR2(64));
      2. Run the following procedure to load data from a file in Azure Blob Storage into a table in your Oracle AI Database:
        
        BEGIN
              DBMS_CLOUD.COPY_DATA(
                  table_name => 'mytab',
                  credential_name => 'AZURECRED',
                  file_uri_list => 'https://demoforblob.blob.core.windows.net/demoblob/data.csv',
                  format => json_object('delimiter' value ',')
              );
          END;
      3. Run the following query to retrieve all columns and all rows from the table named MYTAB:
        select * from mytab;
      4. Run the following procedure to import the data from .txt file:
        BEGIN
            DBMS_CLOUD.COPY_DATA(
                table_name => 'mydata',
                credential_name => 'AZURECRED',
                file_uri_list => 'https://demoforblob.blob.core.windows.net/demoblob/data.txt',
                format => json_object('delimiter' value ',')
            );
        END;
      5. Run the following procedure to import the data using .dmp file.
        
        # data pump parameter file: impdemo.par
        directory=DATA_PUMP_DIR
        credential=AZURECRED
        schemas=demouser
        dumpfile=https://demoforblob.blob.core.windows.net/demoblob/demouser.dmp
        logfile=demoimp.log
        
        # data pump import commandimpdp userid=ADMIN@adb_high parfile=impdemo.par
    2. Access to import Log file in Autonomous AI Database
      1. After you import data by using Data Pump into Autonomous AI Database, you can check the files that the import creates in DATA_PUMP_DIR on the database server:
        select object_name from DBMS_CLOUD.LIST_FILES('DATA_PUMP_DIR') order by last_modified desc;
      2. Copy the log file directly to Azure Blob Storage and download it from there:
        BEGIN
            DBMS_CLOUD.PUT_OBJECT(
                'AZURECRED',
                'https://demoforblob.blob.core.windows.net/demoblob/logs/',
                'DATA_PUMP_DIR',
                'demoimp.log');
        END;
      3. If you keep files in Azure Blob Storage and want to query them as tables in Oracle AI Database, use the DBMS_CLOUD.CREATE_EXTERNAL_TABLE procedure to define an external table that references the Azure Blob Storage location.
        
        BEGIN
              DBMS_CLOUD.CREATE_EXTERNAL_TABLE(
                  table_name       => 'exttab',
                  credential_name  => 'AZURECRED',
                  file_uri_list    => 'https://demoforblob.blob.core.windows.net/demoblob/data.csv',
                  column_list      => 'id NUMBER, name VARCHAR2(64)',
                  format           => json_object('delimiter' value ',')
              );
          END;
      4. Run the following query to retrieve all columns and all rows from the table :
        select * from exttab;

    Learn More

    For more information, see the following resources:
  • Cloud providers offer different capabilities. As demand for cloud native capabilities grows, many organizations adopt multicloud strategies to use services from each platform and reduce vendor lock in.

    Databases remain central to enterprise architectures. Oracle AI Database supports high volume transaction workloads and analytics, and it provides consistency and availability that support business requirements. In a multicloud model, Oracle AI Database can help organizations run and manage data across multiple cloud environments.

    This topic describes the network configuration that enables Autonomous AI Database deployed on Oracle AI Database@Azure to mount the Network File System (NFS) Azure File Shares.

    Creating the Azure file share and setting up connectivity between the NFS private endpoint and the Autonomous AI Database endpoint are outside the scope of this article.

    Before you continue, ensure that you are familiar with the Oracle AI Database@Azure network topologies, Autonomous AI Database provisioning, NFS storage options, and Oracle AI Database@Azure DNS options.

    Solution Architecture

    Autonomous AI Database in Oracle AI Database@Azure uses the VCN DNS resolver. The resolver first checks the private DNS zones in the VCN private view. If the resolver does not find the fully qualified domain name in the private view, it forwards the request to the OCI public DNS resolver. As a result, Azure DNS and the Oracle AI Database@Azure DNS capability operate separately, and private DNS zones do not resolve across clouds.

    When you provision Autonomous AI Database networking, the service assigns a fully qualified domain name under the Oracle Cloud domain. OCI hosts that domain as a private DNS zone. After you create the service, OCI replicates the DNS records into a matching Azure Private DNS zone. Applications in Azure resolve the Autonomous AI Database fully qualified domain name by using that Azure private zone.

    Azure links the Azure Private DNS zone to the virtual network where Autonomous AI Database is deployed.

    This screenshot shows the solution architecture.

    Ensure that you already have an Azure Files NFS share that is exposed through a private endpoint. If you do not have this configuration, see the Create an Azure classic file share to create one.

    1. Obtain the Fully Qualified Domain Name (FQDN)
      1. From the Azure portal, navigate to Storage accounts. and then select your account from the list.
      2. From the left menu, expand the Security + networking section, and then select Networking.
      3. Select the Private endpoints tab and select your private endpoint from the list.
      4. From the left menu, expand the Settings section and then select DNS configuration.
      5. From the Network interface section, obtain the FQDN and IP address information. Record these information as they are required while creating Private DNS Zone in OCI.The screenshot shows how to obtain the Fully Qualified Domain Name (FQDN).
    2. Configure the OCI DNS
      1. From the Azure portal, navigate to your resource. From the Overview section, select the Go to OCI link.This screenshot shows how to navigate to OCI from Azure portal.
    3. Create Private DNS Zone
      Create a private DNS zone that matches the fully qualified domain name of the NFS share in Azure. When Autonomous AI Database resolves that fully qualified domain name, it queries the VCN resolver, which checks the zones in the private view. The zone includes an A record that maps to the private endpoint for the Azure NFS storage.
      Note

      Use the FQDN and IP address that you copied previously to create your Private DNS zone.
      1. From the OCI console, select Networking and then select Virtual cloud networks.
      2. From the list, select your Virtual Cloud Network (VCN) that you are using.
      3. From the Details tab, select the DNS Resolver link.
      4. From the Private resolvers page, select the Details tab and then select the Default private view link.
      5. From the Private views page, select the Private zones tab and then select the Create zone button. For example, file.core.windows.net.
      6. After creating a private zone, select the Records tab and then add a record. For example, demofornfs. Ensure that the record points to the actual IP address of Azure NFS storage.
      7. Publish the changes.
      8. Update the Network Security Group (NSG) in OCI to allow traffic from the VPC where the Azure NFS server resides.
      9. After you complete the configuration, the fully qualified domain name from the OCI database resolves to the Azure NFS endpoint.

    Mount the NFS Azure File Share on Autonomous AI Database

    On the Autonomous AI Database service, you can access the Exadata VM Cluster. After you connect to the VM cluster, run the mount command. For more information, see Connect - Autonomous AI Database (Serverless).
    Note

    NFSv4.1 uses port 2049. If you connect from an on premises network, allow outbound traffic on port 2049. If you use network security groups for the virtual networks, make sure that the rules allow traffic on port 2049.
    1. Switch to the root user.
    2. Create a mount point directory:
      mkdir /mnt/azure
    3. Mount the NFS share:
      sudo mount -t nfs <storage-account>.file.core.windows.net:/<storage-account>/<share-name> /mnt/azure_nfs -o vers=4,minorversion=1,sec=sys,nconnect=4,noresvport,actimeo=30
    4. Verify the mount:
      mount | grep azure_nfs
      
      df -h /mnt/azure_nfs
      
      
    5. Create a directory object, or use an existing directory object, to attach the NFS file system.
      CREATE or replace DIRECTORY FSS_DIR AS ‘fss’;
    6. Attach NFS to a directory in Autonomous AI Database:
      
      exec  
              DBMS_CLOUD_ADMIN.ATTACH_FILE_SYSTEM(  
              file_system_name => ‘AZURE_FILES’,  
              file_system_location =>’demofornfs.file.core.windows.net:/demo_nfs/backup’,  
              directory_name => ‘FSS_DIR’,  
              description => ‘Attach Azure Files’,  
              params => JSON_OBJECT(‘nfs_version’ value 4) );
    7. Verify the result:
      SELECT file_system_name, file_system_location, directory_path FROM
            dba_cloud_file_systems;
    8. Validate with Data Pump import:

      As a validation step, import a database dump into Autonomous AI Database from a source environment. Mounting the NFS share on the source database is outside the scope of this article. From the source system, copy the export dump file to the NFS backed storage so Autonomous AI Database can import it.

      In this example, an export of the HR schema is placed on the NFS mount and imported into a new schema named HRNEW.

      $ ./impdp admin/********@adbdemo_high directory=fss_dir dumpfile=hrexp.dmp logfile=impsh.log full=y remap_schema=HR:HRNEW
      
      Import: Release 23.0.0.0.0 - Production on Tue Feb 25 17:48:29 2025
      Version 23.4.0.24.05
      
      Copyright (c) 1982, 2024, Oracle and/or its affiliates.  All rights reserved.
      
      Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
      Master table "ADMIN"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
      Starting "ADMIN"."SYS_IMPORT_FULL_01":  admin/********@adbdemo_high directory=fss_dir dumpfile=hrexp.dmp logfile=impsh.log full=y remap_schema=HR:HRNEW
      Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
      Processing object type SCHEMA_EXPORT/ROLE_GRANT
      Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
      Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
      Processing object type SCHEMA_EXPORT/TABLE/TABLE
      Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
      . . imported "HRNEW"."REGIONS"                     3.20 KB   15 rows
      . . imported "HRNEW"."LOCATIONS"                 6.8 KB   36 rows
      . . imported "HRNEW"."DEPARTMENTS"                59.17 KB     24 rows
      . . imported "HRNEW"."JOBS"                  2.3 KB       15 rows
      . . imported "HRNEW"."EMPLOYEES"                 12.53 MB     122345 rows
      . . imported "HRNEW"."JOB_HISTORY" 14.6 KB   4500 rows
      Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
      Processing object type SCHEMA_EXPORT/TABLE/COMMENT
      Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
      Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
      Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
      Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
      Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCACT_SCHEMA
      Job "ADMIN"."SYS_IMPORT_FULL_01" successfully completed 
      
      

    Conclusion

    Loading data from external storage is a key capability for Autonomous AI Database bulk loads, migrations, and data ingestion. This article describes the configuration to attach Azure based NFS storage to an Autonomous AI Database environment, including prerequisites, setup steps, and validation steps.