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 220.127.116.11.0 - 64bit Production PL/SQL Release 18.104.22.168.0 - Production CORE 22.214.171.124.0 Production TNS for Linux: Version 126.96.36.199.0 - Production NLSRTL Version 188.8.131.52.0 - 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?
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""