Choose a migration method from the source database, the application's scope, the allowed interruption, and evidence from a rehearsal. A method that transfers data successfully still needs application validation.
Oracle DBA Lesson 53 Part 1 — Choose a Non-CDB Migration Path
Start from an existing 19c non-CDB
The source is an existing Oracle Database 19c non-CDB. The destination is a compatible 19c target CDB with a normal PDB. Creating a new non-CDB is outside this recommendation. Earlier releases need a separately supported upgrade and migration path. Assess the exact release update, platform support, component compatibility, character-set rules, encryption, and licensing for the actual environment. This part selects and prepares the route. Part 2 explains the compatible copied-file adoption sequence.
Collect an inventory that answers useful questions
Confirm database identity before collecting evidence. Run the queries in the intended source database. On a target CDB, identify the root or PDB scope for each comparison. A query in one PDB does not inventory the whole CDB.
SELECT name, cdb, open_mode, log_mode FROM v$database;
| NAME | CDB | OPEN_MODE | LOG_MODE |
|---|---|---|---|
APPDB | NO | READ WRITE | ARCHIVELOG |
CDB=NO identifies a non-CDB. READ WRITE describes the current open mode. ARCHIVELOG describes redo archival mode. Neither open mode nor archival mode establishes migration eligibility or a measured outage. Record the precise source and target release and RU separately.
SELECT parameter, value FROM nls_database_parameters
WHERE parameter IN ('NLS_CHARACTERSET','NLS_NCHAR_CHARACTERSET');
| PARAMETER | VALUE |
|---|---|
NLS_CHARACTERSET | AL32UTF8 |
NLS_NCHAR_CHARACTERSET | AL16UTF16 |
The database character set governs ordinary character data. The national character set governs national character data. Check the applicable target rules. Identical values are not a requirement of every physical migration. Oracle 19c has specific AL32UTF8 CDB compatibility provisions, and application containers impose their own matching rules. Data Pump text conversion must still preserve the application's data. A logical route keeps the representability and conversion requirements.
SELECT comp_id, version, status FROM dba_registry
ORDER BY comp_id;
| COMP_ID | VERSION | STATUS |
|---|---|---|
CATALOG | 19.0.0.0.0 | VALID |
CATPROC | 19.0.0.0.0 | VALID |
The registry lists installed database components and their recorded status and version. The two rows above are an excerpt, not a complete registry. Investigate invalid components and differences with the target. The component version alone is not the installed SQL patch inventory.
See V$DATABASE, NLS_DATABASE_PARAMETERS, DBA_REGISTRY, and DBA_REGISTRY_SQLPATCH.
Additional checks include:
- Exact database binaries and RU, and the SQL patch state.
DBA_REGISTRY_SQLPATCHrecords SQL patch application history. Review the action and status together with the actual binary inventory. One version string is not that proof. - Time zone file versions and stored time-zone-sensitive data.
- Platform and endianness requirements for the chosen physical path. An operating-system name alone does not establish supported file portability.
- Installed options and components, their compatibility with the destination, and entitlement to the features in use.
- Encrypted tablespaces and the keystore, key transfer, and opening procedure. Copied encrypted files require usable keys.
- Actual file sizes, destination capacity, temporary staging space, storage throughput, and service and network requirements. A copied-file route needs space for the separate target copy.
- Source and target backups, a tested recovery arrangement, and a defined fallback point.
See licensing information. Confirm entitlement for the selected configuration. Feature documentation alone does not grant it.
A descriptor-based adoption uses DBMS_PDB.CHECK_PLUG_COMPATIBILITY in the target root. Read PDB_PLUG_IN_VIOLATIONS, resolve the relevant issues, and repeat the check. A successful compatibility result is not an application acceptance test. The exact state, order, and conversion script belong to Part 2. See adopting a non-CDB as a PDB.
Understand what each route does
| Route | What happens | When to evaluate it | Main evidence needed |
|---|---|---|---|
| Physical adoption or supported physical cloning | Existing data files supply the new PDB; non-CDB dictionary definitions must be converted | Whole database belongs together and physical compatibility can be satisfied | Compatibility checks, protected source and backup, target space, rehearsed copy, conversion, and validation time |
| Conventional Data Pump | Selected logical objects and rows are exported and imported into a prepared PDB | Selected schemas or objects, planned logical remapping, or a supported change better handled logically | Object and dependency coverage, conversion and mapping tests, measured export and import, and application validation |
| Engineered replication, such as GoldenGate | Initial load establishes the target; ongoing source changes are captured and applied | A rehearsed simpler route cannot meet the interruption budget and the extra system is justified | Supported objects and types, configuration and licensing, initial-load consistency, final transaction catch-up, correctness tests, and operational support |
See options for creating a PDB from a non-CDB.
Physical adoption is a copy. The protected source files stay in place, and the target receives separate files on disk. Conversion changes the target dictionary. SQL ROLLBACK does not undo that conversion. Protect the source and test its recovery path independently. See CREATE PLUGGABLE DATABASE.
The Data Pump route in this comparison is conventional logical transfer. Full transportable export/import is a distinct hybrid that moves user tablespace files with metadata and has its own prerequisites. A conventional schema export does not describe every Data Pump mode. See Data Pump in a multitenant environment.
Replication is not a universal migration solution. Build a consistent initial target and make sure supported changes are captured and applied. At the planned cutover, stop or drain source writes, allow the final transactions to arrive, validate consistency and application behavior, then redirect clients. Measure the actual interruption. Connection handling, retries, jobs, and application behavior can add work beyond replication lag. The route does not promise zero downtime.
Compare a rehearsal with the interruption limit
Take an entire existing 19c application database that should become a PDB. The business supplies an interruption limit, and no rehearsal has been measured yet.
- Gather the source and target inventory and resolve physical compatibility findings.
- Select copied-file adoption as a candidate, preserving the source files and a tested backup and recovery path.
- Rehearse the complete sequence: stopping work, file copying where it applies, dictionary conversion, opening and checks, application validation, and service redirection. Record the total period the application cannot do its required work.
- Compare that measured duration with the business limit. Keep the route when it meets the limit and the acceptance tests succeed.
- When the duration exceeds the limit, evaluate replication and its costs and requirements. When only selected schemas should migrate, evaluate conventional Data Pump, including dependency and remapping coverage.
| Requirement or decision | Current evidence |
|---|---|
| Business interruption limit | To be supplied for the actual application |
| Physical compatibility | Pending complete checks/resolution |
| End-to-end rehearsal duration | Pending measurement |
| Required application tests | Pending execution |
| Chosen method and rejected alternative | Pending evidence-based decision |
Database size influences copying and loading. Size alone cannot predict the interruption. The route description does not encode transfer speed, a byte count, or a guaranteed elapsed time.
Follow the application beyond tables
Trace a real business operation from its service and account through its tables and external dependencies:
- The service resolves to the intended target PDB, and clients use it successfully.
- Accounts, privileges, roles, profiles, and application configuration provide the intended access.
- Scheduler jobs and external programs run at the intended location and time. Avoid duplicate jobs in the source and the target during rehearsal and cutover.
- Directory objects refer to usable destination paths with the required operating-system access. A metadata name alone does not move an external file.
- Database links reach the intended remote services, and credentials remain manageable.
- Application-container and common-object assumptions match the actual target design. An ordinary PDB and an application PDB are not interchangeable until those assumptions are checked.
Assign an owner to each dependency and an observable test. A useful acceptance set includes expected rows, key business totals, a complete application transaction, scheduled work, and the correct service and container identity. A row count can miss wrong values and broken behavior.
Define the fallback point before the move. After users commit new transactions at the target, the former source is stale. Returning service to it needs an explicit plan for those new changes. Preserved source files do not contain transactions committed only at the target.
Recap
Choose the route from the source, the scope that must move, the allowed interruption, and a measured rehearsal. Inventory identity, open mode, archival mode, character sets, components, SQL patches, platform, keys, capacity, and plug-in compatibility before treating a method as ready. Physical adoption copies the data files and then converts the target dictionary. Conventional Data Pump moves selected logical objects. Replication adds capture and a final catch-up when a simpler rehearsed route cannot meet the interruption limit. Validate the application and its dependencies. The fallback has to account for transactions that exist only at the target.
No comments:
Post a Comment