2009年06月25日


Oracle : 別スキーマテーブル置き換えインポート : コマンドライン入力支援

<SCRIPT language="VBScript">

Set WshShell = CreateObject( "WScript.Shell" )

Function expdp()

	str = "impdp "
	str = str & document.getElementById("p01").value & "/"
	str = str & document.getElementById("p02").value
	str = str & "@//" & document.getElementById("p03").value
	str = str & " DIRECTORY=" & document.getElementById("p04").value
	str = str & " DUMPFILE=" & document.getElementById("p05").value
	str = str & " REMAP_SCHEMA=" & document.getElementById("p06A").value
	str = str & ":" & document.getElementById("p06B").value
	str = str & " REMAP_TABLESPACE=" & document.getElementById("p09A").value
	str = str & ":" & document.getElementById("p09B").value
	str = str & " TABLES=" & document.getElementById("p07").value
	str = str & " TABLE_EXISTS_ACTION=REPLACE"
	str = str & " TRANSFORM=SEGMENT_ATTRIBUTES:n"

	if vbCancel = MsgBox(str, vbOkCancel or vbDefaultButton2, "impdp") then
		Exit Function
	end if

	Call WshShell.Run( "cmd.exe /c "&str& " & pause" , , True )

End Function

</SCRIPT>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" />
<STYLE>
 * {
	font-size:14px;
}
PRE {
	font-weight: bold;
}
</STYLE>
</head>
<body>

<table>
<tr>
<td>ユーザ</td><td><INPUT type="text" id="p01" value="lightbox"></td>
</tr>
<tr>
<td>パスワード</td><td><INPUT type="text" id="p02" value="lightbox"></td>
</tr>
<tr>
<td>サーバー</td><td><INPUT type="text" id="p03" value="pcname/orcl"></td>
</tr>
<tr>
<td>ディリクトリオブジェクト</td><td><INPUT type="text" id="p04" value="lightbox"></td>
</tr>
<tr>
<td>ダンプファイル</td><td><INPUT type="text" id="p05" value="lightbox.dmp"></td>
</tr>
<tr>
	<td>スキーマのマッピング</td>
	<td>
		<INPUT type="text" id="p06A" value="lightbox">から
		<INPUT type="text" id="p06B" value="lightbox">へ
	</td>
</tr>
<tr>
	<td>テーブルスペースのマッピング</td>
	<td>
		<INPUT type="text" id="p09A">から
		<INPUT type="text" id="p09B">へ
	</td>
</tr>
<tr>
	<td>テーブル</td>
	<td>
		<INPUT type="text" id="p07" size=80 value="社員マスタ">
	</td>
</tr>
</table>

<INPUT type="button" value="実行" onClick='Call expdp()'>


</body>
</html>

タグ:impdp Oracle
posted by at 01:06 | 古い記事(保存用) | このブログの読者になる | 更新情報をチェックする