After the export is finished one should always check if the export dump file is corrupted on thesource machine using imp with "show=y". If getting the errors then the file is corrupted on the source machine.
Some time problem occurs with dump when the dump is copied on the network location from the local machine although copy process is done successful.
Assuming the file is not corrupted on the source machine, after transferring the file, one must execute imp with "show=y" on target machine. If getting the above errors then the file was corrupted during transfer. Use ftp command in binary mode as a way of transferring the dump file between source and target machines.
You can create the script for this integrity test like below.
integTest.bat
set ORACLE_HOME=D:\app\inam\product\11.2.0\dbhome_1
set day=%date:~0,3%
set mm=%date:~4,2%
set dd=%date:~7,2%
set yy=%date:~-4%
echo Integrity Test started @ %date% - %time% >> \\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\OR-21\IntegrityTestStatus_%yy%%mm%%dd%.txt
echo Before Copying log >> \\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\OR-21\IntegrityTestStatus_%yy%%mm%%dd%.txt
copy D:\HOME_Backup\Backup_Daily\HOMEdb1_full_%yy%%mm%%dd%.log \\192.168.2.81\dumps_integrity\Dumps\OR-21 /Y
echo Before Copying dump >> \\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\OR-21\IntegrityTestStatus.txt
copy D:\HOME_Backup\Backup_Daily\HOMEdb1_full_%yy%%mm%%dd%.dmp \\192.168.2.81\dumps_integrity\Dumps\OR-21 /Y
echo Before running IMP >> \\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\OR-21\IntegrityTestStatus_%yy%%mm%%dd%.txt
imp 'sys/HOMEdev@HOMEdev as sysdba' TABLES=(Payment_Request) fromuser=HOME touser=HOMEstage file=\\192.168.2.81\e$\DUMPS_INTEGRITY\Dumps\OR-21\HOMEdb1_full_%yy%%mm%%dd%.dmp log=\\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\-OR-21\IntegrityTest_HOMEdb1_full_%yy%%mm%%dd%.log buffer=20971520 SHOW=Yecho Integrity Test ended @ %date% - %time% >> \\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\OR-21\IntegrityTestStatus_%yy%%mm%%dd%.txt
Some time problem occurs with dump when the dump is copied on the network location from the local machine although copy process is done successful.
Assuming the file is not corrupted on the source machine, after transferring the file, one must execute imp with "show=y" on target machine. If getting the above errors then the file was corrupted during transfer. Use ftp command in binary mode as a way of transferring the dump file between source and target machines.
You can create the script for this integrity test like below.
integTest.bat
set ORACLE_HOME=D:\app\inam\product\11.2.0\dbhome_1
set day=%date:~0,3%
set mm=%date:~4,2%
set dd=%date:~7,2%
set yy=%date:~-4%
echo Integrity Test started @ %date% - %time% >> \\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\OR-21\IntegrityTestStatus_%yy%%mm%%dd%.txt
echo Before Copying log >> \\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\OR-21\IntegrityTestStatus_%yy%%mm%%dd%.txt
copy D:\HOME_Backup\Backup_Daily\HOMEdb1_full_%yy%%mm%%dd%.log \\192.168.2.81\dumps_integrity\Dumps\OR-21 /Y
echo Before Copying dump >> \\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\OR-21\IntegrityTestStatus.txt
copy D:\HOME_Backup\Backup_Daily\HOMEdb1_full_%yy%%mm%%dd%.dmp \\192.168.2.81\dumps_integrity\Dumps\OR-21 /Y
echo Before running IMP >> \\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\OR-21\IntegrityTestStatus_%yy%%mm%%dd%.txt
imp 'sys/HOMEdev@HOMEdev as sysdba' TABLES=(Payment_Request) fromuser=HOME touser=HOMEstage file=\\192.168.2.81\e$\DUMPS_INTEGRITY\Dumps\OR-21\HOMEdb1_full_%yy%%mm%%dd%.dmp log=\\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\-OR-21\IntegrityTest_HOMEdb1_full_%yy%%mm%%dd%.log buffer=20971520 SHOW=Yecho Integrity Test ended @ %date% - %time% >> \\192.168.2.81\e$\DUMPS_INTEGRITY\IntegrityTest\OR-21\IntegrityTestStatus_%yy%%mm%%dd%.txt
No comments:
Post a Comment