Migrate/Export DB from Oracle 11g Enterprise to Oracle 11g Express

Posted on

Question :

So I’m a DBA newbie and I’ve got an Oracle Enterprise server running in production with the following information under All Reports -> Data Dictionary Reports -> Version Banner, under “Your_Database_Settings”.

Oracle Database 11g Enterprise Edition Release - 64bit Production
PL/SQL Release - Production
CORE Production 
TNS for Linux: Version - Production
NLSRTL Version - Production

I would like to export/clone the database I have running on the server and import it into a new Oracle 11g Express installation to run some sandboxed tests.

Can someone help me with detailed instructions on how to make that happen?

Answer :

This is example with HR user(example user in Oracle database) and Countries table. We’ll extract a couple of rows with query – where region_id=2(table has 25 rows).
I created another user, HR2 and table Countries with same structure(but no FK constraints to ease import).
From HR we will export subset of Countries table and in HR2 we’ll import the data.

> [oracle@orcla ~]$ expdp system/password tables=hr.countries dumpfile=testdump.dmp content=data_only query=hr.countries:"where region_id=2""

Leave a Reply

Your email address will not be published. Required fields are marked *