C ウォレットを使用した非対話型のパスワード指定
コマンドラインでパスワードを入力せず、ユーザーとのやり取りなしにZDMCLI MIGRATE DATABASE
コマンドを実行することができます。
現在、$ZDM_HOME/bin/zdmcli migrate database
コマンドを発行するたびに、ソース・データベースのSYS
パスワード、Object Storeユーザー・スイフト認証トークンおよびソース・データベースの透過的データ暗号化(TDE)キーストア・パスワード(PASSWORD
ベースのTDEウォレットとしてウォレットが構成されている場合)の入力を求められます。コマンドラインでパスワードを入力する必要がない場合(Rundeckを使用して自動化を実行する場合など)は、次のステップを実行します。
Zero Downtime Migrationサービス・ホストで、Zero Downtime Migrationソフトウェア所有者(zdmuser
など)として次のコマンドを実行します。
-
ソース・データベース
SYS
ユーザーの自動ログイン・ウォレットを作成します。-
ウォレットを作成して格納するディレクトリを作成します。
zdmuser> mkdir sys_wallet_path
次に例を示します。
/u01/app/zdmhome> mkdir sysWallet
-
ウォレットを作成します。
zdmuser> $ZDM_HOME/bin/orapki wallet create -wallet sys_wallet_path -auto_login_only
次に例を示します
/u01/app/zdmhome> $ZDM_HOME/bin/orapki wallet create -wallet sysWallet -auto_login_only Oracle PKI Tool Release 19.0.0.0.0 - Production Version 19.4.0.0.0 Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. Operation is successfully completed.
-
SYS
ユーザー・ログイン資格証明をウォレットに追加します。zdmuser> $ZDM_HOME/bin/mkstore -wrl sys_wallet_path -createCredential store sysuser
プロンプトで、ソース・データベースの
SYS
パスワードを入力します。次に例を示します
/u01/app/zdmhome> $ZDM_HOME/bin/mkstore -wrl ./sysWallet -createCredential store sysuser Oracle Secret Store Tool Release 19.0.0.0.0 - Production Version 19.4.0.0.0 Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. Your secret/Password is missing in the command line Enter your secret/Password: Re-enter your secret/Password:
-
ウォレット・ファイルが作成されたことを確認します。
zdmuser> ls -l sys_wallet_path
次に例を示します
/u01/app/zdmhome> ls -l sysWallet/ total 4 -rw-------. 1 opc opc 581 Jun 2 08:00 cwallet.sso -rw-------. 1 opc opc 0 Jun 2 08:00 cwallet.sso.lck
-
-
Object Storeユーザーの自動ログイン・ウォレットを作成します。
-
ウォレットを作成して格納するディレクトリを作成します。
zdmuser> mkdir oss_wallet_path
次に例を示します
/u01/app/zdmhome> mkdir ossWallet
-
ウォレットを作成します
zdmuser> $ZDM_HOME/bin/orapki wallet create -wallet oss_wallet_path -auto_login_only
次に例を示します
/u01/app/zdmhome> $ZDM_HOME/bin/orapki wallet create -wallet ./ossWallet -auto_login_only Oracle PKI Tool Release 19.0.0.0.0 -Production Version 19.4.0.0.0 Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. Operation is successfully completed.
-
Object Storeユーザー・ログイン資格証明をウォレットに追加します。
zdmuser> $ZDM_HOME/bin/mkstore -wrl oss_wallet_path -createCredential store ossuser
プロンプトで、
-
バックアップ先がObject Store (バケット)の場合は、ユーザーswift認証トークンを入力します。
-
バックアップ先がStorage Classic (コンテナ)の場合は、テナンシ・ログイン・パスワードを入力します。
次に例を示します
/u01/app/zdmhome> $ZDM_HOME/bin/mkstore -wrl ./ossWallet -createCredential store ossuser Oracle Secret Store Tool Release 19.0.0.0.0 - Production Version 19.4.0.0.0 Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. Your secret/Password is missing in the command line Enter your secret/Password: Re-enter your secret/Password:
-
-
ウォレット・ファイルが作成されたことを確認します。
zdmuser> ls -l oss_wallet_path
次に例を示します
/u01/app/zdmhome> ls -l ./ossWallet total 4 -rw-------. 1 opc opc 597 Jun 2 08:02 cwallet.sso -rw-------. 1 opc opc 0 Jun 2 08:01 cwallet.sso.lck
-
-
ソース・データベースTDEキーストアの自動ログイン・ウォレットを作成します。
-
ウォレットを作成して格納するディレクトリを作成します。
zdmuser> mkdir tde_wallet_path
次に例を示します
/u01/app/zdmhome> mkdir tdeWallet
-
ウォレットを作成します。
zdmuser> $ZDM_HOME/bin/orapki wallet create -wallet tde_wallet_path -auto_login_only
次に例を示します
/u01/app/zdmhome> $ZDM_HOME/bin/orapki wallet create -wallet ./tdeWallet -auto_login_only Oracle PKI Tool Release 19.0.0.0.0 - Production Version 19.4.0.0.0 Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. Operation is successfully completed.
-
ソース・データベースTDEキーストア資格証明をウォレットに追加します。
zdmuser> $ZDM_HOME/bin/mkstore -wrl tde_wallet_path -createCredential store tdeuser
プロンプトで、TDEキーストア・パスワードを入力します。
次に例を示します
/u01/app/zdmhome> $ZDM_HOME/bin/mkstore -wrl ./tdeWallet -createCredential store tdeuser Oracle Secret Store Tool Release 19.0.0.0.0 - Production Version 19.4.0.0.0 Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. Your secret/Password is missing in the command line Enter your secret/Password: Re-enter your secret/Password:
-
ウォレット・ファイルが作成されたことを確認します。
zdmuser> ls -l tde_wallet_path
次に例を示します
/u01/app/zdmhome> ls -l tdeWallet total 4 -rw-------. 1 opc opc 581 Jun 2 08:06 cwallet.sso -rw-------. 1 opc opc 0 Jun 2 08:04 cwallet.sso.lck
-
ウォレットにアクセスするためのコマンド・オプションの設定
ZDMCLI MIGRATE DATABASE
コマンドでウォレット情報を指定するには、次に示すように-sourcesyswallet
、-osswallet
および-tdekeystorewallet
オプションを設定します。
zdmuser> $ZDM_HOME/bin/zdmcli migrate database
-sourcedb source_db_unique_name_value
-sourcenode source_database_server_name -srcauth zdmauth
-srcarg1 user:source_database_server_login_user_name
-srcarg2 identity_file:zdm_installed_user_private_key_file_location
-srcarg3 sudo_location:/usr/bin/sudo -targetnode target_database_server_name
-backupuser object_store_login_user_name -rsp response_file_location
-tgtauth zdmauth -tgtarg1 user:target_database_server_login_user_name
-tgtarg2 identity_file:zdm_installed_user_private_key_file_location
-tgtarg3 sudo_location:/usr/bin/sudo -sourcesyswallet sys_wallet_path
-osswallet oss_wallet_path -tdekeystorewallet tde_wallet_path
-eval
-sourcesyswallet sys_wallet_path
は、ソース・データベースのSYS
パスワードを含むZero Downtime Migrationホスト上の自動ログイン・ウォレット・ファイルのフルパスを指定します。-osswallet oss_wallet_path
は、Object Storage Serviceバックアップ・ユーザーの資格証明を含むZero Downtime Migrationホスト上の自動ログイン・ウォレット・ファイルのフルパスを指定します。-tdekeystorewallet tde_wallet_path
は、TDEキーストア・パスワードを含むZero Downtime Migrationホスト上の自動ログイン・ウォレット・ファイルのフルパスを指定します。
評価モードの例
zdmuser> $ZDM_HOME/bin/zdmcli migrate database -sourcedb zdmsdb -sourcenode ocicdb1
-srcauth zdmauth -srcarg1 user:opc
-srcarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk
-srcarg3 sudo_location:/usr/bin/sudo -targetnode ocidb1
-backupuser backup_user@example.com
-rsp /u01/app/zdmhome/rhp/zdm/template/zdm_template_zdmsdb.rsp -tgtauth zdmauth
-tgtarg1 user:opc -tgtarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk
-tgtarg3 sudo_location:/usr/bin/sudo -sourcesyswallet /u01/app/zdmhome/sysWallet
-osswallet /u01/app/zdmhome/ossWallet -eval
Operation "zdmcli migrate database" scheduled with the job ID "1".
移行モードの例
zdmuser> $ZDM_HOME/bin/zdmcli migrate database -sourcedb zdmsdb -sourcenode ocicdb1
-srcauth zdmauth -srcarg1 user:opc
-srcarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk
-srcarg3 sudo_location:/usr/bin/sudo -targetnode ocidb1
-backupuser backup_user@example.com
-rsp /u01/app/zdmhome/rhp/zdm/template/zdm_template_zdmsdb.rsp -tgtauth zdmauth
-tgtarg1 user:opc -tgtarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk
-tgtarg3 sudo_location:/usr/bin/sudo -sourcesyswallet /u01/app/zdmhome/sysWallet
-osswallet /u01/app/zdmhome/ossWallet
Operation "zdmcli migrate database" scheduled with the job ID "2".