-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataPumpImport.sql
More file actions
24 lines (15 loc) · 1.03 KB
/
DataPumpImport.sql
File metadata and controls
24 lines (15 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
select * from dba_directories;
grant read,write ON DIRECTORY data_pump_dir to MGPROD;
-- run as oracle on odb80
-- place dmp file in directory tied to "data_pump_dir" use query above to query location
-- *********** Import as MGPROD
-- impdp MGPROD/odb80mgprod@KCDEV SCHEMAS=MGPROD DIRECTORY=data_pump_dir DUMPFILE=mgprod20111110.dmp
--
-- for multi file dump (Note: %U represents a two digit number starting at 01...)
-- impdp MGPROD/odb80mgprod@KCDEV SCHEMAS=MGPROD DIRECTORY=data_pump_dir DUMPFILE=kc_%U_20111201.112148.dmp logfile=kc_01_20111201.112148.log
-- *********** Import as SYSDBA into MGPROD
-- export ORACLE_SID=kcdev
-- impdp userid=\"/ as sysdba\" SCHEMAS=MGPROD directory=data_pump_dir dumpfile=mgprod20111110.dmp logfile=mgprod20111110.log
-- ********** Remap schema and tablespace
-- export ORACLE_SID=kcdev
-- impdp userid=\"/ as sysdba\" SCHEMAS=MGPROD remap_schema=mgprod:mgprod01 remap_tablespace=mgprod:mgprod01 directory=data_pump_dir dumpfile=kc_%U_20111202.174815.dmp logfile=kc_XX_20111202.174815.dmp.log