meta données pour cette page
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| oracle:database:cloning_pdb_between_servers_using_nfs_share [15/04/2025 07:48] – créée mdl | oracle:database:cloning_pdb_between_servers_using_nfs_share [26/10/2025 10:52] (Version actuelle) – mdl | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | ====== Cloning a PDB between servers using NFS share ====== | ||
| + | |||
| + | |||
| * Create a Copy of Source PDB | * Create a Copy of Source PDB | ||
| <code PLSQL> | <code PLSQL> | ||
| # Set Oracle environment | # Set Oracle environment | ||
| - | . oraenv <<< | + | . oraenv <<< |
| # Connect to SQL*Plus | # Connect to SQL*Plus | ||
| Ligne 12: | Ligne 15: | ||
| # Create PDB copy | # Create PDB copy | ||
| - | create pluggable database | + | create pluggable database |
| # Verify creation | # Verify creation | ||
| Ligne 19: | Ligne 22: | ||
| </ | </ | ||
| + | * Move PDB to NFS Share | ||
| + | <code PLSQL> | ||
| + | # Set Oracle environment | ||
| + | . oraenv <<< | ||
| + | # Connect to SQL*Plus | ||
| + | sqlplus / as sysdba | ||
| + | |||
| + | # Close the PDB | ||
| + | Alter pluggable database SIT_PDB2_COPY close immediate instances=all; | ||
| + | |||
| + | exit | ||
| + | |||
| + | rman target / | ||
| + | |||
| + | run { | ||
| + | allocate channel c1 type disk; | ||
| + | allocate channel c2 type disk; | ||
| + | allocate channel c3 type disk; | ||
| + | allocate channel c4 type disk; | ||
| + | backup as copy pluggable database SIT_PDB2_COPY format '/ | ||
| + | } | ||
| + | |||
| + | switch pluggable database SIT_PDB2_COPY to copy; | ||
| + | exit | ||
| + | </ | ||
| + | |||
| + | * Create Manifest File | ||
| <code PLSQL> | <code PLSQL> | ||
| + | sqlplus / as sysdba | ||
| + | alter pluggable database SIT_PDB2_COPY unplug into '/ | ||
| + | |||
| + | show pdbs | ||
| + | exit | ||
| </ | </ | ||
| + | * Create PDB on Target Server | ||
| <code PLSQL> | <code PLSQL> | ||
| + | # Set Oracle environment | ||
| + | . oraenv <<< | ||
| + | |||
| + | sqlplus / as sysdba | ||
| + | |||
| + | create pluggable database PDB2 using '/ | ||
| + | exit | ||
| + | </ | ||
| + | |||
| + | * Restore PDB datafiles on Target Server | ||
| + | <code PLSQL> | ||
| + | rman target / | ||
| + | |||
| + | run { | ||
| + | allocate channel c1 type disk; | ||
| + | allocate channel c2 type disk; | ||
| + | allocate channel c3 type disk; | ||
| + | allocate channel c4 type disk; | ||
| + | backup as copy pluggable database PDB2 format ' | ||
| + | } | ||
| + | |||
| + | switch pluggable database PDB2 to copy; | ||
| + | exit | ||
| + | </ | ||
| + | |||
| + | * Clean Up Source CDB | ||
| + | <code PLSQL> | ||
| + | # Drop the PDB copy | ||
| + | drop pluggable database PDB2_COPY including datafiles; | ||
| + | |||
| + | # Verify PDBs | ||
| + | show pdbs | ||
| + | exit | ||
| + | </ | ||
| + | |||
| + | * Clean Up data files on the NFS | ||
| + | <code BASH> | ||
| + | # Remove the datafiles on the NFS | ||
| + | cd /NFS/ORACLE | ||
| + | rm -rf / | ||
| </ | </ | ||