You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

19.11非CDB本地文件系统迁移至同服务器ASM环境PDB的低停机方案咨询

Low-Downtime Migration: Filesystem Non-CDB → ASM-Based PDB (19.11)

The most reliable low-downtime approach here is using Oracle Data Guard to create an ASM-based physical standby non-CDB, followed by a switchover (near-zero downtime) and converting the standby to a PDB. Here's the step-by-step breakdown:

Step 1: Prepare ASM Environment

  • Confirm ASM is installed, configured, and running on your server.
  • Create ASM disk groups for data, redo logs, and temporary files (match the source non-CDB's storage requirements).

Step 2: Set Up ASM Physical Standby Non-CDB

  1. Enable archiving on the source filesystem non-CDB (if not already enabled):
    ALTER DATABASE ARCHIVELOG;
    
  2. Use RMAN to perform an active duplicate of the source to the ASM standby:
    rman target sys@source_noncdb auxiliary sys@asm_standby
    DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE
    SPFILE
      PARAMETER_VALUE_CONVERT '/your/filesystem/path/', '+ASM_DATA/'
      SET DB_FILE_NAME_CONVERT '/your/filesystem/path/', '+ASM_DATA/'
      SET LOG_FILE_NAME_CONVERT '/your/redo/path/', '+ASM_REDO/'
      SET STANDBY_FILE_MANAGEMENT=AUTO;
    
  3. Start managed recovery on the standby to keep it in sync with the source:
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
    

Step 3: Validate Standby Synchronization

  • Check that redo logs are being applied correctly:
    SELECT SEQUENCE#, APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE# DESC;
    
  • Ensure all archived logs from the source are applied before proceeding to switchover.

Step 4: Switchover to ASM Standby

This is the only step with minimal downtime (typically seconds to minutes):

  1. On the source primary:
    ALTER DATABASE COMMIT TO SWITCHOVER TO STANDBY WITH SESSION SHUTDOWN;
    
  2. On the ASM standby:
    ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
    
  3. Verify the new primary (ASM non-CDB) is open and accessible.

Step 5: Convert ASM Non-CDB to PDB

  1. Prepare your target CDB (ensure it uses local undo and is PDB-enabled):
    ALTER DATABASE LOCAL UNDO ON;
    ALTER PLUGGABLE DATABASE ALL OPEN;
    
  2. Put the ASM non-CDB in read-only mode:
    ALTER DATABASE OPEN READ ONLY;
    
  3. Plug the non-CDB into the CDB as a PDB:
    -- Run from the target CDB root
    CREATE PLUGGABLE DATABASE your_pdb_name USING '+ASM_DATA/your_noncdb_name'
    SOURCE_FILE_NAME_CONVERT '+ASM_DATA/your_noncdb_name/', '+ASM_CDB_DATA/your_pdb_name/';
    
  4. Open the new PDB:
    ALTER PLUGGABLE DATABASE your_pdb_name OPEN;
    
  5. Clean up the old filesystem non-CDB (optional, once verified).

Alternative: RMAN Incremental Duplicate + Switchover

If Data Guard isn’t feasible, use RMAN to create an ASM non-CDB, sync with incremental backups, then switch:

  1. Perform an active duplicate of the source to ASM while the source is online.
  2. Take incremental backups of the source and apply them to the ASM non-CDB to keep it updated.
  3. Shutdown the source, apply the final incremental backup, open the ASM non-CDB as primary, then convert to PDB.

Critical Considerations

  • Downtime: Only the switchover step requires downtime; all other operations run while the source is online.
  • Version Compatibility: Ensure the target CDB runs the same 19.11 version as the source non-CDB.
  • ASM Compatibility: Set disk group compatibility to 19.0.0.0.0 to support 19c features.

内容的提问来源于stack exchange,提问作者user22476323

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.12 07:55:35