Thursday, August 5, 2010

impdp jobs execution

Impdp jobs :


Note:The Database directory should be created using os directory reference and the dump files used in the Datapump jobs should be place in the OS directory path.Use the impdp keywords in CAPS to avoid some trouble releated to
UTL_FILE_DIR.Grant all permissions to all the files and the OS directory used in the impdp job.

Eg: In the below case the dump files are present in /work/AUG01IMP

SQL> host ls -altr
total 15621060
-rwxrwxrwx 1 star oinstall 4626391040 Aug 2 06:23 STARMIG_01Aug10.dmp
-rwxrwxrwx 1 star oinstall 155648 Aug 2 06:24 STARREPAPP_01Aug10.DMP
-rwxrwxrwx 1 star oinstall 3042091008 Aug 2 06:26 STARREP_01Aug10.dmp
-rwxrwxrwx 1 star oinstall 155648 Aug 2 06:27 STARTXNAPP_01Aug10.DMP
-rwxrwxrwx 1 star oinstall 8311242752 Aug 2 06:31 STARTXN_01Aug10.dmp


SQL>Select *from all_directories;


SQL> select owner||' '||directory_name||' '||directory_path from dba_directories where directory_name like '%AUG01%';
OWNER||''||DIRECTORY_NAME||''||DIRECTORY_PATH
--------------------------------------------------------------------------------
SYS IMP_DP_AUG01 /work/AUG01IMP


impdp system/star DIRECTORY=IMP_DP_AUG01 DUMPFILE=STARMIG_01Aug10.dmp LOGFILE=StartMigAUG01.log version=10.2

impdp system/star DIRECTORY=IMP_DP_AUG01 DUMPFILE=STARREP_01Aug10.dmp LOGFILE=Starrep01aug.log version=10.2

impdp system/star DIRECTORY=IMP_DP_AUG01 DUMPFILE=STARTXN_01Aug10.dmp LOGFILE=startxnAug01.log version=10.2

impdp system/star DIRECTORY=IMP_DP_AUG01 DUMPFILE=STARREPAPP_01Aug10.DMP LOGFILE=StarrepappAug01.log version=10.2

impdp system/star DIRECTORY=IMP_DP_AUG01 DUMPFILE=STARTXNAPP_01Aug10.DMP LOGFILE=StartxnappAug01.log version=10.2

Running impdp jobs in back ground with & and without any interruption using nohup:
----------------------------------------------------------------------------------

The shell script contains the impdp script.

Eg: impdpstarmig.sh contains:

impdp system/star DIRECTORY=IMP_DP_AUG01 DUMPFILE=STARMIG_01Aug10.dmp LOGFILE=StartMigAUG01.log version=10.2

Run the jobs as below:

1)nohup sh impdpstarmig.sh>a.out &

2)nohup sh imdpstartxn.sh>b.out &

3)nohup sh imdpstarrepapp.sh>c.out &

4)nohup sh imdpstrrep.sh>d.out &

5)nohup sh imdpstartxnapp.sh>e.out &

Importing one table with DATAPUMP REMAP_SCHEMA OPTION:
--------------------------------------------------------


NOTE:WHILE USING DATAPUMP USE ALL KEYWORDS AND SCHEMA NAME IN CAPS LETTER.DATAPUMP KEYWORDS AND OPTIONS ARE CASE SENSITIVE.

impdp system/*** DIRECTORY=IMP_DP_AUG DUMPFILE=expaug08.dmp REMAP_SCHEMA=STARTXN:TEST10 TABLES=REPORT_GROUP LOGFILE=TESTREP.log

EXCLUDE=STATISTICS to import without statistics and reducing time.








Best regards,

Rafi.

No comments:

Post a Comment