C ウォレットを使用した非対話型のパスワード指定
Rundeckを使用して自動化を行う場合など、コマンドラインでパスワードを入力することを避け、ユーザーとのやり取りなしでZDMCLI migrate database
コマンドを実行できます。
現在、$ZDM_HOME/bin/zdmcli migrate database
コマンドを発行するたびに、ソース・データベースのSYS
パスワード、Object Storeユーザー・スイフト認証トークンおよびソース・データベースの透過的データ暗号化(TDE)キーストア・パスワード(PASSWORD
ベースのTDEウォレットとしてウォレットが構成されている場合)の入力を求められます。
Wallet作成例
次の例では、ソース・データベースのSYSユーザー、Object Storeユーザー、ソース・データベースのTDEキーストア、およびターゲットCDBデータベースのTDEキーストア・パスワードのための自動ログイン・ウォレットを作成する方法を示します。
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
ターゲットCDBデータベースのTDEキーストア・パスワードの自動ログイン・ウォレットを作成するには:
-
ウォレットを作成して格納するディレクトリを作成します。
zdmuser> mkdir cdb_tde_wallet_path
たとえば
/u01/app/zdmhome> mkdir cdbtdeWallet
-
ウォレットを作成します。
zdmuser> $ZDM_HOME/bin/orapki wallet create -wallet cdb_tde_wallet_path -auto_login_only
たとえば
/u01/app/zdmhome> $ZDM_HOME/bin/orapki wallet create -wallet ./cdbtdeWallet -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 cdb_tde_wallet_path -createCredential store cdbtdeuser
プロンプトで、TDEキーストア・パスワードを入力します。
たとえば
/u01/app/zdmhome> $ZDM_HOME/bin/mkstore -wrl ./cdbtdeWallet -createCredential store cdbtdeuser 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:
dbuser
のパスワード・セットを格納する自動ログイン・ウォレットを作成するには:
- 次のコマンドを使用して、
dbuser
のパスワード・セットを格納する自動ログイン・ウォレットを作成します:./orapki wallet create -wallet <wallet_path> -auto_login_only
- ステップ1で、
-asuser
オプションで使用されるユーザー名のエントリを作成します:./mkstore -wrl <wallet_path> -createEntry <non_admin_user>
論理移行ジョブでのウォレットへのアクセス
論理移行では、移行のユースケースに応じたRSP WALLET_*
パラメータを使用してウォレット・パラメータを構成します。個々のパラメータの詳細は、次のリンクを参照してください。
- WALLET_AMAZONS3SECRET: Amazon S3秘密キーのウォレット・パス
- WALLET_SOURCEGGADMIN: ソース・データベース管理ユーザー
ggadmin
のパスワードのウォレット・パス - WALLET_SOURCECONTAINER: ソース・データベース管理ユーザーのパスワードのウォレット・パス
- WALLET_SOURCECGGADMIN: ソース・データベース管理ユーザー
c##ggadmin
のパスワードのウォレット・パス - WALLET_TARGETADMIN: ターゲット・データベース管理ユーザーのパスワードのウォレット・パス
- WALLET_TARGETGGADMIN: ターゲット・データベース管理ユーザー
ggadmin
のパスワードのウォレット・パス - WALLET_OGGADMIN: Oracle GoldenGateハブの管理パスワードのウォレット・パス
- WALLET_DATAPUMPENCRYPTION: Oracle Data Pumpの暗号化パスワードのウォレット・パス
- WALLET_OCIAUTHTOKEN: OCI認証トークンのパスワードのウォレット・パス
- WALLET_USERACTION:
dbuser
のパスワード・セットを格納する自動ログイン・ウォレット
物理移行ジョブでのウォレットへのアクセス
物理移行では、ZDMCLI database migration
コマンドでオプションとしてウォレット・パラメータを構成します。database migration
オプションの詳細は、migrate databaseを参照してください。
- -sourcesyswallet sys_wallet_path: ソース・データベースの
SYS
パスワードのウォレット・パス - -osswallet oss_wallet_path: Object Storage Service (OSS)のバックアップ・ユーザーのウォレット・パス
- -dvwallet dv_wallet_path: Oracle Database Vaultの所有者のウォレット・パス
- -tdekeystorewallet tde_wallet_path: 透過的データ暗号化(TDE)キーストアのパスワードのウォレット・パス
- -tgttdekeystorewallet tde_wallet_path: ターゲット・コンテナ・データベースのTDEキーストア・パスワードのウォレット・パス
- -backupwallet backup_wallet_path: RMANバックアップ・パスワードのウォレット・パス
なお、非マルチテナント・ソース・データベースをターゲット上のマルチテナント・アーキテクチャ、つまりプラガブル・データベース(PDB)に変換する場合は、ターゲット・コンテナ・データベース(CDB)のTDEキーストア・パスワード用の自動ログイン・ウォレットを作成することもできます。
ウォレットにアクセスするためのコマンド・オプションの設定
ZDMCLI MIGRATE DATABASE
コマンドでウォレット情報を指定するには、次に示されているように-sourcesyswallet
、-osswallet
、-tdekeystorewallet
および-tgttdekeystorewallet
オプションを設定します。
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
-tgttdekeystorewallet cdb_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ホスト上の自動ログイン・ウォレット・ファイルのフルパスを指定します。-
-tgttdekeystorewallet cdb_tde_wallet_path
は、ターゲットCDBの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".