- Migrating Oracle Java Cloud Service on OCI-C to Oracle WebLogic Server for OCI Using tar
- Migrate an Instance
- Migrate the DBCS Data to an OCI Database System
- Export the Pluggable Database from the DBCS System
Export the Pluggable Database from the DBCS System
To export the PDB:
ssh
to one of the nodes in the DBCS system and list the contents.- Become the
oracle
user and accesssqlplus
.sudo su - oracle sqlplus <At the prompt enter>: sys as sysdba <enter password when prompted>
- Switch to the PDB.
alter session set container = pdb_name_for_DBCS;
For example:
alter session set container = PDB1;
- Create an alias to the path where the dump file will be placed.
create or replace directory dump_file_alias as 'path_to_place_dump_file';
For example:create or replace directory dbcs_pdb1_dump as '/home/oracle';
- Grant the right to a user to write to this path alias.
grant read, write on directory dump_file_alias to db_user;
For example:grant read, write on directory dbcs_pdb1_dump to system;
- Grant full right to a user to export the database and exit.
grant exp_full_database to db_user;
exit;
For example:grant exp_full_database to system;
exit;
- Run the
export
command from outside thesqlplus
prompt as theoracle
user. Provide the password for thedatabase
user when prompted.expdp db_user@pdb_name_for_DBCS directory=dump_file_alias dumpfile=dump_file_name logfile=log_file_name full=y
For example:expdp system@PDB1 directory=dbcs_pdb1_dump dumpfile=dbcs_pdb1_dump.dmp logfile=dbcs_pdb1_dump.log full=y
The dump process will take time. If the job completes successfully, the last line of the output will include the text successfully completed.
- Record the size of the dump file to ensure that the Oracle Cloud
Infrastructure Database System
will have enough space to accept the file.
du -sh path_to_place_dump_file/dump_file_name
For example:du -sh /home/oracle/dbcs_pdb1_dump.dmp
- Save the file size for use in the next step. See Step 2 of Move the Dump File to the Oracle Cloud Infrastructure Database System.