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
- Enable archiving on the source filesystem non-CDB (if not already enabled):
ALTER DATABASE ARCHIVELOG; - 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; - 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):
- On the source primary:
ALTER DATABASE COMMIT TO SWITCHOVER TO STANDBY WITH SESSION SHUTDOWN; - On the ASM standby:
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY; - Verify the new primary (ASM non-CDB) is open and accessible.
Step 5: Convert ASM Non-CDB to PDB
- Prepare your target CDB (ensure it uses local undo and is PDB-enabled):
ALTER DATABASE LOCAL UNDO ON; ALTER PLUGGABLE DATABASE ALL OPEN; - Put the ASM non-CDB in read-only mode:
ALTER DATABASE OPEN READ ONLY; - 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/'; - Open the new PDB:
ALTER PLUGGABLE DATABASE your_pdb_name OPEN; - 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:
- Perform an active duplicate of the source to ASM while the source is online.
- Take incremental backups of the source and apply them to the ASM non-CDB to keep it updated.
- 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
相关产品推荐
相关产品推荐

