オンプレ oracle12.1c => AWS RDS oracle12.1c 移行 ② オンプレ da

■ Sqlplus ログイン
 
######## sqlplus ユーザ名/パスワード@インスタンス
$sqlplus SYSTEM/MANAGER@SRV-ORA12
$sqlplus TSU/TSU@SRV-ORA12
 
ーーーーーーーー
ディレクトリ作成
 
######## create or replace directory 作成ディレクトリ名 as'実在のディレクトリパス';
$create or replace directory backup_dir_01 as'C:\Users\natsume\Documents\oracl_test';
 
ディレクトリパス 一覧 確認
 
$ select directory_path from ALL_DIRECTORIES;
ーーーーーーーー
■ 権限
 
####### grant read,write on directory ディレクトリ名 to ユーザ名;
$grant read,write on directory backup_dir_001 to TSU;
 
スキーマを調べる
 
--DBA権限があるユーザーの場合
select username from dba_users;
 
--DBA権限がないユーザーの場合
select username from all_users;
 
ーーーーーーーー
 
■ Data Pump 実行
### オプション full=y フルバックアップ
$expdp TSU/TSU@SRV-ORA12 directory=backup_dir_001 dumpfile=tsu.dmp