A technical troubleshooting blog about Oracle with other Databases & Cloud Technologies.

Export from 11g and import to 19c

1 min read
To perform the export/import first we need to create a backup directory at the OS level as well as Database level using the following steps.

Create a backup directory

$mkdir -p /u01/expdp_bkp

Now login in Database using sys user and create the directory at the database level:

SQL> create directory expdp_bkp as '/u01/expdp_bkp';

Grant Permission to schema from which you want to take backup:

SQL> grant read,write on directory expdp_bkp to asrblg; 

Take Full Export from 11g Database
$expdp username/password@dbname full=y directory=expdp_bkp dumpfile=full_db_bkp.dmp logfile=full_db_bkp.log
Check tablespaces 

Before importing the above data in Oracle 19c you must check the existing tablespaces detail in the Oracle 11g database, and create the same tablespaces in the Oracle 19c Database as well otherwise you will face errors related to tablespaces. You can check the existing tablespace details using the following command:
SQL>select name from v$tablespace;
Send the export file to the Oracle Database 19c server
$scp /u01/expdp_bkp/full_db_bkp.dmp oracle@192.168.66.34:/u02/expdp_bkp
Import 11g Data to 19c
$impdp username/password@dbname directory=expdp_bkp dumpfile=full_db_bkp.dmp logfile=imp_full_db_bkp.log

Hope it worked !! 🙂