I want to move a series of tables from one schema to another. At the same time I want to move them to a new tablespace. Data Pump is great for doing this.
The following data pump parameters allow for this. You can remap more then one tablespace at a time.
First export the tables.
Export parfile example (expdp_joe_tables.par):
USERID='/ as sysdba'
TABLES=(JOE.TABLE1, JOE.TABLE2, JOE.TABLE3)
DUMPFILE=joe_tables
LOGFILE=expdp_joe_tables
-- Run the expdp command
#expdp parfile=expdp_joe_tables.par
Import parfile example (impdp_joe_tables.par):
USERID='/ as sysdba'
TABLES=(JOE.TABLE1, JOE.TABLE2, JOE.TABLE3)
REMAP_SCHEMA=JOE:SAM
REMAP_TABLESPACE=USERJOE1:USERSAM1,USERJOE2:USERSAM2
DUMPFILE=joe_tables
LOGFILE=impdp_joe_tables
Import the tables to a new schema and tablespace.
-- Run the impdp command
#impdp parfile=impdp_joe_tables.par
Remember your dreams
Subscribe to:
Post Comments (Atom)
Proactive Oracle DBA
This is a series of posts. I am working this to share some of the many scripts I schedule to automatically run to alert me of any current o...
-
Oracle 12.1.0.2.0 RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested i...
-
How to get Oracle's runInstaller to run on Linux or Unix environment using from Windows using Cygwin as an xterm emulator. Download an...
-
A great security measure is to monitor who is trying to unsuccessfully log into your database. Whether it's an innocent developer who fo...
No comments:
Post a Comment