- 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
- Import the PDB from DBCS into the Oracle Cloud Infrastructure Database System
Import the PDB from DBCS into the Oracle Cloud Infrastructure Database System
To import the PDB:
ssh
to one of the nodes in the Oracle Cloud Infrastructure Database 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 on the Oracle Cloud
Infrastructure Database System.
alter session set container = pdb_name_for_OCI_DB;
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; exit;
For example:grant read, write on directory dbcs_pdb1_dump to system; exit;
- Run the
import
command from outside thesqlplus
prompt as theoracle
user. Provide the password for thedatabase
user when prompted.impdp db_user@tns_alias directory=dbcs_pdb1_dump dumpfile=dbcs_pdb1_dump.dmp logfile=log_file_name full=y
For example:impdp system@PDB1 directory=dbcs_pdb1_dump dumpfile=dbcs_pdb1_dump.dmp logfile=dbcs_pdb1_dump.log full=y
The command should complete with few errors because certain object types such as tablespace temp and tablespace users already exist. This is an expected behavior.
- Search for
ORA-
in the log file to examine the errors.For example:cat /home/oracle/dbcs_pdb1_dump.log | grep ORA-
Check that the errors end with already exists or are some other expected errors such as "USER:"SYS" failed due to insufficient privileges. The main errors to look for are with the JRF schemas. For example, an error that includes _OPSS in it.
- Before exiting, construct the connect string that will be used by examining the
tnsnames.ora
entries.cat /u01/app/oracle/product/db_version/db_home/network/admin/tnsnames.ora
For example:cat /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/tnsnames.ora
- Locate the listener alias.For example:
cat /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/tnsnames.ora
PDB1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = my.dbhost.vcnfqdn)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdb1.sometext.vcnfqdn) ) )
- Record the
HOST:PORT/SERVICE_NAME
as the connect string. You will need this when you are migrating your Oracle Java Cloud Service domain contents to Oracle WebLogic Server for Oracle Cloud Infrastructure.Using this example, the connect string will be:
my.dbhost.vcnfqdn:1521/pdb1.sometext.vcnfqdn