회사에서 Backup과 데이터 이관의 목적으로 Oracle Data Pump Export를 쓴다.
반복적인 작업에 손을 적게 가도록 스크립트를 하나 짰다. ^^;;;
누구나 쉽게 짤 수 있는 것이겠지만... ^^;;;;
'FileName: OracleBackup.vbs
'작성일: 2006-12-28
'설명: Oracle Data Pump를 쉽게 하기 위해서 Script 제작
' expdp 명령에 인수로 들어가는 id/pwd는 프롬프트로 받음
' 생성 파일은 오늘 날짜값이 들어감.
Option Explicit
' 오라클 루트 디렉토리 상수 선언
Const OracleRoot = "C:\oracle\product\10.2.0\db_1\"
'변수 선언
Dim sysDate
Dim MyMSG, OracleMSG
Dim fso, MyFile
Dim wshShell
Dim LoginID, LoginPWD
' 오늘 날짜를 받는다
sysDate = Date
LoginID = InputBox("로그인 아이디를 넣으세요")
LoginPWD = InputBox("로그인 암호를 넣으세요")
'실행할 구문
Run OracleRoot&"bin\Expdp.exe "&LoginID&"/"&LoginPWD&" DumpFile="&sysDate&".dmp full=y"
Sub Run (GivenPass)
Set wshShell = WScript.CreateObject("WScript.Shell")
wshShell.Run GivenPass
Set wshShell = Nothing
End Sub


