Import Dump from Windows to Linux in SBL
1. Download the following rpm and install
[root@stnprod2 rpm]# rpm -Uvh unrar-3.8.2-1.el3.rf.x86_64.rpm
warning: unrar-3.8.2-1.el3.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
error: failed to stat /mnt/test: Input/output error
Preparing… ########################################### [100%]
1:unrar ########################################### [100%]
2. Send the dump file to Linux Server.
3. Unrar the dump file using following command
[root@stnprod2 stelar_back]# unrar e Stelar_23072013.part01.rar
UNRAR 3.80 beta 2 freeware Copyright (c) 1993-2008 Alexander Roshal
Extracting from Stelar_23072013.part01.rar
Extracting Stelar_Tue.DMP 23%
Extracting from Stelar_23072013.part02.rar
… Stelar_Tue.DMP 47%
Extracting from Stelar_23072013.part03.rar
… Stelar_Tue.DMP 71%
Extracting from Stelar_23072013.part04.rar
… Stelar_Tue.DMP 95%
Extracting from Stelar_23072013.part05.rar
… Stelar_Tue.DMP OK
All OK
[root@stnprod2 stelar_back]# ll
total 70739316
-r-sr-sr-t 1 root root 4414504960 Jul 24 23:49 Stelar_23072013.part01.rar
-r-sr-sr-t 1 root root 4414504960 Jul 25 00:02 Stelar_23072013.part02.rar
-r-sr-sr-t 1 root root 4414504960 Jul 25 00:12 Stelar_23072013.part03.rar
-r-sr-sr-t 1 root root 4414504960 Jul 25 17:22 Stelar_23072013.part04.rar
-r-sr-sr-t 1 root root 922800911 Jul 25 17:25 Stelar_23072013.part05.rar
-rw-r–r– 1 root root 53785440256 Jul 23 04:28 Stelar_Tue.DMP
[root@stnprod2 stelar_back]#
4. create batch file and script to execute from Windows
–script.bat
:: Open a Telnet window
start telnet.exe 192.168.10.9
:: Run the script
cscript F:\batch\SendKeys.vbs
–SendKeys.vbs
set OBJECT=WScript.CreateObject(“WScript.Shell”)
WScript.sleep 50
OBJECT.SendKeys “oracle{ENTER}”
WScript.sleep 100
OBJECT.SendKeys “oracle{ENTER}”
WScript.sleep 50
OBJECT.SendKeys “cd /back/stelar_back{ENTER}”
WScript.sleep 50
OBJECT.SendKeys “imp system/sys123 file=/back/stelar_back/Stelar_Tue.DMP full=Y{ENTER}”
WScript.sleep 50
OBJECT.SendKeys ” ”
5. execute the batch file
[root@stnprod2 rpm]# rpm -Uvh unrar-3.8.2-1.el3.rf.x86_64.rpm
warning: unrar-3.8.2-1.el3.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
error: failed to stat /mnt/test: Input/output error
Preparing… ########################################### [100%]
1:unrar ########################################### [100%]
2. Send the dump file to Linux Server.
3. Unrar the dump file using following command
[root@stnprod2 stelar_back]# unrar e Stelar_23072013.part01.rar
UNRAR 3.80 beta 2 freeware Copyright (c) 1993-2008 Alexander Roshal
Extracting from Stelar_23072013.part01.rar
Extracting Stelar_Tue.DMP 23%
Extracting from Stelar_23072013.part02.rar
… Stelar_Tue.DMP 47%
Extracting from Stelar_23072013.part03.rar
… Stelar_Tue.DMP 71%
Extracting from Stelar_23072013.part04.rar
… Stelar_Tue.DMP 95%
Extracting from Stelar_23072013.part05.rar
… Stelar_Tue.DMP OK
All OK
[root@stnprod2 stelar_back]# ll
total 70739316
-r-sr-sr-t 1 root root 4414504960 Jul 24 23:49 Stelar_23072013.part01.rar
-r-sr-sr-t 1 root root 4414504960 Jul 25 00:02 Stelar_23072013.part02.rar
-r-sr-sr-t 1 root root 4414504960 Jul 25 00:12 Stelar_23072013.part03.rar
-r-sr-sr-t 1 root root 4414504960 Jul 25 17:22 Stelar_23072013.part04.rar
-r-sr-sr-t 1 root root 922800911 Jul 25 17:25 Stelar_23072013.part05.rar
-rw-r–r– 1 root root 53785440256 Jul 23 04:28 Stelar_Tue.DMP
[root@stnprod2 stelar_back]#
4. create batch file and script to execute from Windows
–script.bat
:: Open a Telnet window
start telnet.exe 192.168.10.9
:: Run the script
cscript F:\batch\SendKeys.vbs
–SendKeys.vbs
set OBJECT=WScript.CreateObject(“WScript.Shell”)
WScript.sleep 50
OBJECT.SendKeys “oracle{ENTER}”
WScript.sleep 100
OBJECT.SendKeys “oracle{ENTER}”
WScript.sleep 50
OBJECT.SendKeys “cd /back/stelar_back{ENTER}”
WScript.sleep 50
OBJECT.SendKeys “imp system/sys123 file=/back/stelar_back/Stelar_Tue.DMP full=Y{ENTER}”
WScript.sleep 50
OBJECT.SendKeys ” ”
5. execute the batch file
No comments:
Post a Comment