1.準備
C:\verup>sqlplus system/password@127.0.0.1:8521/orcl
SQL*Plus: Release 11.2.0.1.0 Production on 火 12月 2 10:00:58 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
に接続されました。
SQL>
SQL>
ダンプファイル(Exportしたファイルのこと)とログを格納するディレクトリを作成。
SQL> create directory dumpdir as 'c:\verup\dump';
ディレクトリが作成されました。
SQL> create directory logdir as 'c:\verup\log';
ディレクトリが作成されました。
Oracleのユーザにディレクトリに読み書き権限を与える。
SQL>grant read,write on directory dumpdir to biz_one;
権限付与が成功しました。
※上記のコマンドを実行しないと、ORA-39070が発生しますよ。
ORA-39070: ログ・ファイルをオープンできません。
ディレクトリ・オブジェクトの確認
SQL>set pagesize 0;
SQL>select * from dba_directories;
2.Exportコマンドを投入
expdp dbuser/password@orcl schemas=biz_one directory=dumpdir dumpfile=biz_one_20141202.DMP
3.Import コマンドで導入
impdp new_user/password@orcl directory=dumpdir remap_schema=biz_one:biz_two dumpfile=biz_one_20141202.DMP
4.export 時と異なるスキーマ、異なる表領域に import
impdp user/password@orcl directory=dumpdir remap_schema=old_schema:new_schema dumpfile=xxxx.DMP remap_tablespace=old_tablespace:new_tablespace
0 件のコメント:
コメントを投稿