JRFドメインの作成時に、モデル内のdomainInfo
セクションの下にあるセクションRCUDbInfo
に、すべてのRCU接続情報を指定できます。
JRFドメインは、JRFドメイン・テンプレートから複数のデータ・ソースを作成します。
データ・ソース名 | JNDI名 | スキーマ | ターゲット |
---|---|---|---|
WLSSchemaDataSource | jdbc/WLSSchemaDataSource | prefix_WLS_RUNTIME | なし |
LocalSvcTblDataSource | jdbc/WLSSchemaDataSource | prefix_STB | 管理サーバー |
opss-data-source | jdbc/OpssDataSource | prefix_OPSS | 管理サーバーとクラスタ |
opss-audit-viewDS | jdbc/AuditViewDataSource | prefix_IAU_VIEWER | 管理サーバーとクラスタ |
opss-audit-DBDS | jdbc/AuditAppendDataSource | prefix_IAU_APPEND | 管理サーバーとクラスタ |
mds-owsm | jdbc/mds/owsm | prefix_MDS | 管理サーバーとクラスタ |
デフォルトでは、JRFドメイン・テンプレートのデータ・ソースには、デフォルトのプレフィクスDEV
を持つURLやスキーマなどのデフォルト情報のみが含まれます。 ドメインの作成中、WDTはRCUDbinfo
セクションで指定した情報を使用してテンプレートのデフォルト値をオーバーライドし、指定したデータベースに接続できるようにします。
Oracle Active GridLinkデータ・ソースまたはマルチ・データ・ソースの使用など、高度なユースケースでは、ドメイン作成時に別のモデル・ファイルにデータ・ソースのスパース・モデルを提供できます。 「アドバンス・ユース・ケース」を参照してください。
JRFドメイン・ホーム・ディレクトリが破損または失われる状況が見つかった場合は、以前にドメインの暗号化キーをOracleウォレットにエクスポートしていた場合に、既存のRCUスキーマを使用して新しいドメイン・ホーム・ディレクトリを作成できます。 暗号化キーをウォレットにエクスポートするには、OPSS WLSTオフラインのexportEncryptionKey関数を使用します。
JRFドメイン・ホームを再作成する場合は、次の2つのオプションがあります:
Create Domainツールの-opss_wallet <path-to-wallet-file>
引数と、次のいずれかの引数を使用してウォレット・パスフレーズを渡します:
-opss_wallet_passphrase_env <environment-variable-name>
- ウォレット・パスフレーズを取得するために、環境変数名を読取りに渡すだけです。-opss_wallet_passphrase_file <path-to-file>
- ウォレット・パスフレーズを含むファイルのファイル名を渡すだけです。Archive Helperツールのadd opssWallet
コマンドを使用して、OPSSウォレットを所定のロケーション(つまり、wlsdeploy/opsswallet/
)のアーカイブ・ファイルに追加し、domainInfo
セクションのOPSSWalletPassphrase
フィールドにパスフレーズを指定します。
domainInfo:
OPSSWalletPassphrase: MySecureOPSSWalletPassphrase
wallet
という用語は、Oracle PKIで作成されたウォレット・ファイル(cwallet.sso
、ewallet.p12
など)またはデータベース接続を確立するために使用されるファイルのバンドル(OCI ATPデータベースからダウンロードされたZIPファイルの内容など)を指します。 WDTでは、wallet
という用語は、データベースへの接続に関連する1つ以上のファイルを格納できる単なるロケーションです。
Archive Helper Toolでは、add databaseWallet -wallet_name <name>
を使用したアーカイブへのデータベース・ウォレットの追加がサポートされています。 RCUデータベースに使用されるウォレットの標準名はrcu
で、Archive Helper Toolにはadd rcuWallet
コマンドを使用してファイルを追加するためのショートカットが用意されています。 WDTでは、次の方法で1つ以上のファイルをアーカイブ・ストアド・ウォレット・ディレクトリに追加できます:
アーカイブ・ウォレットに単一のZIPファイルが含まれている場合、WDTがアーカイブ・ファイルからZIPファイルを抽出すると、ZIPファイルが自動的に抽出されます。
DBAから必要なウォレット・ファイルを取得してください。
RCUスキーマのOracleデータベースにアクセスする場合は、tnsnames.ora
ファイルを使用してデータベース接続文字列を指定できます。 rcu_db_conn_string
を明示的に指定するかわりに、次のいずれかを実行します:
tnsnames.ora
ファイルをアーカイブ・ファイル内のrcu
ウォレットに配置するか、またはtnsnames.ora
ファイルが存在するディレクトリへのパスを指すようにoracle.net.tns_admin
属性を設定します。 config/wlsdeploy/dbWallets/myWallet
などのアーカイブへのパス)または絶対パスのいずれかです。 どちらの場合も、tns.alias
属性を設定する必要があります。 tns.alias
は、tnsnames.ora
ファイル内のエントリのネットワーク・サービス名です。 別名は左側にあり、接続文字列は等号の右側にあります。
xxxx = (DESCRIPTION ...)
yyyy = (DESCRIPTION ...)
...
WDTは、tnsnames.ora
ファイルを解析して、指定したtns.alias
に一致する接続文字列を検索し、RCUデータベース接続文字列を取得します。
TLS接続(ATPまたはSSLのoracle_database_connection_type
など)を使用してOracleデータベースにアクセスする場合、データベースはONE_WAYまたはTWO_WAY (相互TLSまたは単にmTLS) SSLを使用できます。
ONE_WAY SSLの場合、接続に必要なのは「トラスト・ストア」のみです。つまり、データベース・サーバーの証明書の署名に使用される認証局(CA)証明書を含むキーストアです。 このトラスト・ストアは、データベース・クライアントがSSLハンドシェイク中にデータベース・サーバーによって提示された証明書を信頼するかどうかを判断するために使用されます。
TWO_WAY SSLを使用する場合、接続には「トラスト・ストア」と「アイデンティティ・ストア」の両方が必要です。つまり、データベース・クライアントがSSLハンドシェイク中にデータベース・サーバーに提示する証明書です。
RCUDbInfo
セクションでは、トラスト・ストアとアイデンティティ・ストアは次の属性を使用して指定されます。
javax.net.ssl.trustStore
- トラスト・ストアとして使用するキー・ストア・ファイル。 これは、ドメイン・ホームからの相対パス(たとえば、config/wlsdeploy/dbWallets/rcu/truststore.jks
などのアーカイブへのパス)またはキー・ストア・ファイルへの絶対パスです。 javax.net.ssl.trustStoreType
- キー・ストア・タイプ(JKS、PKCS12またはSSO)。javax.net.ssl.trustStorePassword
- 必要に応じて、キー・ストア・ファイルを開くために使用するパスフレーズ。javax.net.ssl.keyStore
- トラスト・ストアとして使用するキー・ストア・ファイル。 これは、ドメイン・ホームからの相対パス(たとえば、config/wlsdeploy/dbWallets/rcu/keystore.jks
などのアーカイブへのパス)またはキー・ストア・ファイルへの絶対パスです。 javax.net.ssl.keyStoreType
- キー・ストア・タイプ(JKS、PKCS12またはSSO)。javax.net.ssl.keyStorePassword
- 必要に応じて、キー・ストア・ファイルを開くために使用するパスフレーズ。データベースのタイプおよびSSL接続タイプに応じて、モデル内のRCUDbInfo
で必要な情報を指定できます。
次の例は、RCUデータベースに接続するためのRCUDbInfo
パラメータを指定する方法を示しています。
ATPデータベースでは、ONE_WAYまたはTWO_WAY SSLを使用できます。 ATPデータベース構成に関連するフィールドの詳細は、「SSL接続を使用したデータベースへのアクセス」を参照してください。
たとえば、JRFドメインにOracle Autonomous Transaction Processingクラウド・データベースを使用するには、モデルに次の情報を指定します:
domainInfo:
RCUDbInfo:
oracle_database_connection_type : 'ATP'
rcu_db_conn_string: <URL string, optional if using tnsnames.ora>
rcu_prefix : DEV
rcu_admin_user : admin # only required when you specify the `-run_rcu` flag
rcu_admin_password: <database admin password> # only required when you specify the `-run_rcu` flag
rcu_schema_password : <RCU schema password>
oracle.net.tns_admin: <optional path to the wallet directory containing the tnsnames.ora file>
tns.alias : <alias of ATP db in the tnsnames.ora file>
javax.net.ssl.keyStore: <archive path or absolute path to the identity key store if using mTLS>
javax.net.ssl.keyStoreType: <the identity key store type (JKS, SSO, or PKCS12) if using mTLS>
javax.net.ssl.keyStorePassword : <the identity key store password when generating the wallet from Oracle Cloud Console if using mTLS and not using an SSO wallet as the key store>
javax.net.ssl.trustStore: <archive path or absolute path to the trust key store>
javax.net.ssl.trustStoreType: <the trust key store type (JKS, SSO, or PKCS12)>
javax.net.ssl.trustStorePassword : <the trust key store password when generating the wallet from Oracle Cloud Console if not using an SSO wallet as the trust key store>
ATPデータベースからダウンロードしたデータベース・ウォレットは、ZIPファイルとしてdbWallets
アーカイブ構造の下の名前付きエントリ(たとえば、その名前としてrcu
を使用)としてアーカイブ・ファイルに含めることができます:
wlsdeploy/dbWallets/rcu/Walletxyz.zip
または解凍されたコンテンツとして:
wlsdeploy/dbWallets/rcu/cwallet.sso
wlsdeploy/dbWallets/rcu/ewallet.p12
wlsdeploy/dbWallets/rcu/ewallet.pem
wlsdeploy/dbWallets/rcu/keystore.jks
wlsdeploy/dbWallets/rcu/ojdbc.properties
wlsdeploy/dbWallets/rcu/sqlnet.ora
wlsdeploy/dbWallets/rcu/tnsnames.ora
wlsdeploy/dbWallets/rcu/truststore.jks
実行時に、WDTはファイル(ZIPファイルにある場合)を$DOMAIN_HOME/wlsdeploy/dbWallets/rcu/
に抽出して、通常の相対パスを使用してモデルから直接参照できるようにします。 例えば:
他のOracleデータベースでは、ONE_WAYまたはTWO_WAY SSLを使用できます。 データベース構成に関連するフィールドの詳細は、「SSL接続を使用したデータベースへのアクセス」を参照してください。
TWO_WAY SSLが有効なOracle SSLデータベースで、SSO
ウォレットを使用する場合は、次の例を使用します:
domainInfo:
RCUDbInfo:
oracle_database_connection_type : 'SSL'
rcu_db_conn_string: <URL string, optional if using tnsnames.ora>
rcu_prefix : DEV
rcu_admin_password: <required with -run_rcu flag>
rcu_schema_password: <required>
oracle.net.tns_admin: <optional path to the wallet directory containing the tnsnames.ora file>
tns.alias: <alias of ssl db in the tnsnames.ora file>
javax.net.ssl.keyStore: <path to the SSO wallet with the identity certificate; for example, config/wlsdeploy/dbWallets/rcu/cwallet.sso>
javax.net.ssl.keyStoreType: SSO
javax.net,ssl.trustStore: <path to the SSO wallet with the trust CA certificate; for example, config/wlsdeploy/dbWallets/rcu/cwallet.sso>
javax.net.ssl.trustStoreType: SSO
ONE_WAY SSLを有効にしたOracle SSLデータベース(SSO
ウォレットを使用)の場合は、次の例を使用します:
domainInfo:
RCUDbInfo:
databaseType : 'SSL'
rcu_prefix : DEV
rcu_db_conn_string: <URL string, optional if using tnsnames.ora>
rcu_admin_password: <required with -run_rcu flag>
rcu_schema_password: <required>
oracle.net.tns_admin: <optional path to the wallet directory containing the tnsnames.ora file>
tns.alias: <alias of ssl db in the tnsnames.ora file>
javax.net,ssl.trustStore: <path to the SSO wallet with the trust CA certificate; for example, config/wlsdeploy/dbWallets/rcu/cwallet.sso>
javax.net.ssl.trustStoreType: SSO
TW0_WAY SSLが有効なOracle SSLデータベースで、Oracle PKI PKCS12
ウォレットを使用する場合は、次の例を使用します:
domainInfo:
RCUDbInfo:
databaseType : 'SSL'
rcu_db_conn_string: <URL string, optional if using tnsnames.ora>
rcu_prefix : DEV
rcu_admin_password: <required with -run_rcu flag>
rcu_schema_password: <required>
oracle.net.tns_admin: <optional path to the wallet directory containing the tnsnames.ora file>
tns.alias: <alias of ssl db in the tnsnames.ora file>
javax.net.ssl.keyStore: <path to the PKCS12 keystore with the identity certificate; for example, config/wlsdeploy/dbWallets/rcu/ewallet.p12>
javax.net.ssl.keyStoreType: PKCS12
javax.net.ssl.keyStorePassword: <keystore password>
javax.net.ssl.trustStore: <path to the PKCS12 keystore with the trust CA certificate; for example, config/wlsdeploy/dbWallets/rcu/ewallet.p12>
javax.net.ssl.trustStoreType: PKCS12
javax.net.ssl.trustStorePassword: <truststore password>
ONE_WAY SSLを有効にしたOracle SSLデータベース(PKCS12
ウォレットを使用)の場合は、次の例を使用します:
domainInfo:
RCUDbInfo:
databaseType : 'SSL'
rcu_db_conn_string: <URL string, optional if using tnsnames.ora>
rcu_prefix : DEV
rcu_admin_password: <required with -run_rcu flag>
rcu_schema_password: <required>
oracle.net.tns_admin: <optional path to the wallet directory containing the tnsnames.ora file>
tns.alias: <alias of ssl db in the tnsnames.ora file>
javax.net.ssl.trustStore: <truststore found in the unzipped wallet; for example, config/wlsdeploy/dbWallets/rcu/ewallet.p12>
javax.net.ssl.trustStoreType: PKCS12
javax.net.ssl.trustStorePassword: <password of the truststore>
Oracle PKI生成のPKCS12ウォレットを使用する場合は、ウォレットにアクセスするためにOracle PKIプロバイダを含める必要があります。 Java java.security
ファイルにOracle PKIプロバイダを追加します。 詳細は、「Oracle JDBC ThinドライバによるSSL」の2.2.4「OracleウォレットをJavaで使用する方法」を参照してください。
一般的なデータベースの場合は、次の例を使用します:
domainInfo:
RCUDbInfo:
rcu_prefix : DEV
# Optional rcu_admin_user for creating RCU schema if -run_rcu flag is specified. Default user is SYS if not specified.
# This user must have SYSDBA privilege and this is the equivalent of -dbUser in the RCU utility.
rcu_admin_user: superuser
rcu_admin_password : <required with -run_rcu flag>
rcu_schema_password : <rcu schema password>
rcu_db_conn_string : dbhost:1521/pdborcl
リポジトリ作成ユーティリティのRCU -variables
オプションを、キーrcu_variables
のRCUDbInfo
セクションに含めることができるようになりました:
domainInfo:
RCUDbInfo:
rcu_variables : xxxx
WDTおよび-run_rcu
オプションを使用してドメインを作成する場合、RCUDbInfo
セクションで拡張XMLファイルを指定できます。
これは、createRepository
およびdropRepository
コマンドライン引数RCU -compInfoXMLLocation <file path> -storageXMLLocation <file path>
に関連付けられます。
wlsdeploy/custom/rcu/config
のロケーションを使用して、XMLファイルをアーカイブ・ファイルに含めます。 次に、モデルのRCUDbInfo
セクションに、この相対的なロケーションを含めます。
domainInfo:
RCUDbInfo:
compInfoXMLLocation: config/wlsdeploy/custom/rcu/config/MyComponentInfo.xml
storageXMLLocation: config/wlsdeploy/custom/rcu/config/MyStorage.xml
次のJRFデータ・ソース・スパース・モデルの例では、これを使用してJRFドメイン・テンプレートのデータ・ソースをさらにカスタマイズできます。
たとえば、スキーマごとに異なるパスワードを持つRCUスキーマを作成した場合です。 スパース・モデルを使用して、異なるFMWデータ・ソースに対して異なるパスワードを持つドメインを作成できます。
domainInfo:
RCUDbInfo:
rcu_prefix : -- FIX ME --
rcu_schema_password : -- FIX ME --
rcu_db_conn_string : -- FIX ME --
resources:
JDBCSystemResource:
LocalSvcTblDataSource:
JdbcResource:
JDBCDriverParams:
PasswordEncrypted: --FIX ME--
opss-data-source:
JdbcResource:
JDBCDriverParams:
PasswordEncrypted: --FIX ME--
opss-audit-viewDS:
JdbcResource:
JDBCDriverParams:
PasswordEncrypted: --FIX ME--
opss-audit-DBDS:
JdbcResource:
JDBCDriverParams:
PasswordEncrypted: --FIX ME--
mds-owsm:
JdbcResource:
JDBCDriverParams:
PasswordEncrypted: --FIX ME--
これは、FMWドメインから検出されたFMWデータ・ソースのスパース・モデルです。 ドメインの更新には、その一部を使用できます。
...
resources:
JDBCSystemResource:
WLSSchemaDataSource:
JdbcResource:
JDBCConnectionPoolParams:
TestTableName: SQL ISVALID
MaxCapacity: 75
JDBCDataSourceParams:
GlobalTransactionsProtocol: None
JNDIName: jdbc/WLSSchemaDataSource
JDBCDriverParams:
URL: --FIX ME--
PasswordEncrypted: --FIX ME--
DriverName: oracle.jdbc.OracleDriver
Properties:
user:
Value: FMW1_WLS_RUNTIME
LocalSvcTblDataSource:
Target: admin-server
JdbcResource:
JDBCConnectionPoolParams:
InitialCapacity: 0
CapacityIncrement: 1
TestConnectionsOnReserve: true
ConnectionCreationRetryFrequencySeconds: 10
TestTableName: SQL ISVALID
TestFrequencySeconds: 300
SecondsToTrustAnIdlePoolConnection: 0
MaxCapacity: 200
JDBCDataSourceParams:
GlobalTransactionsProtocol: None
JNDIName: jdbc/LocalSvcTblDataSource
JDBCDriverParams:
URL: --FIX ME--
PasswordEncrypted: --FIX ME--
DriverName: oracle.jdbc.OracleDriver
Properties:
user:
Value: FMW1_STB
oracle.net.CONNECT_TIMEOUT:
Value: '10000'
SendStreamAsBlob:
Value: 'true'
weblogic.jdbc.crossPartitionEnabled:
Value: 'true'
opss-data-source:
Target: cluster-1,admin-server
JdbcResource:
JDBCConnectionPoolParams:
TestTableName: SQL ISVALID
JDBCDataSourceParams:
GlobalTransactionsProtocol: None
JNDIName: jdbc/OpssDataSource
JDBCDriverParams:
URL: --FIX ME--
PasswordEncrypted: --FIX ME--
DriverName: oracle.jdbc.OracleDriver
Properties:
user:
Value: FMW1_OPSS
opss-audit-viewDS:
Target: cluster-1,admin-server
JdbcResource:
JDBCConnectionPoolParams:
TestTableName: SQL ISVALID
JDBCDataSourceParams:
GlobalTransactionsProtocol: None
JNDIName: jdbc/AuditViewDataSource
JDBCDriverParams:
URL: --FIX ME--
PasswordEncrypted: --FIX ME--
DriverName: oracle.jdbc.OracleDriver
Properties:
user:
Value: FMW1_IAU_VIEWER
opss-audit-DBDS:
Target: cluster-1,admin-server
JdbcResource:
JDBCConnectionPoolParams:
TestTableName: SQL ISVALID
JDBCDataSourceParams:
GlobalTransactionsProtocol: None
JNDIName: jdbc/AuditAppendDataSource
JDBCDriverParams:
URL: --FIX ME--
PasswordEncrypted: --FIX ME--
DriverName: oracle.jdbc.OracleDriver
Properties:
user:
Value: FMW1_IAU_APPEND
mds-owsm:
Target: cluster-1,admin-server
JdbcResource:
JDBCConnectionPoolParams:
InitialCapacity: 0
TestConnectionsOnReserve: true
ConnectionCreationRetryFrequencySeconds: 10
TestTableName: SQL ISVALID
TestFrequencySeconds: 300
SecondsToTrustAnIdlePoolConnection: 0
JDBCDataSourceParams:
GlobalTransactionsProtocol: None
JNDIName: jdbc/mds/owsm
JDBCDriverParams:
URL: --FIX ME--
PasswordEncrypted: --FIX ME--
DriverName: oracle.jdbc.OracleDriver
Properties:
user:
Value: FMW1_MDS
oracle.net.CONNECT_TIMEOUT:
Value: '120000'
SendStreamAsBlob:
Value: 'true'
URL
、PasswordEncrypted
およびuser
プロパティ値を更新するだけでなく、Oracle Active Grid Linkデータベースにアクセスするようにデータ・ソースを設定する場合、各データ・ソースのJdbcResource
の下に追加のJDBCOracleParams
を指定できます。 たとえば、
mds-owsm:
Target: cluster-1,admin-server
JdbcResource:
JDBCOracleParams:
OnsNodeList: 'node1, node2'
....
フィールドの完全なリストについては、WDTコマンドを実行
modelHelp.sh -oracle_home <oracle home> resources:/JDBCSystemResource/JdbcResource/JDBCOracleParams
データベースでRACやAGLなどの高可用性をネイティブでサポートしていない場合、WebLogicには「マルチ・データ・ソース」オプションがあり、基本的にはメイン・データ・ソースは複数の物理データ・ソースを含む論理データ・ソースです。 スペア・モデルを作成するには、データ・ソースごとに次を実行できます:
URL
、EncryptedPassword
およびuserプロパティ値を更新します。 URL
部分では、アクセス可能な物理データベースURLのいずれかを指定できます。 -1
、-2
などを追加して、複製されたデータ・ソース名JNDIName
を変更します。 -1
、-2
データ・ソースは物理データ・ソースです。URL
も更新する必要があります。 例(ノート) : 読みやすくするために....
に置き換えられた詳細:
opss-data-source:
....
JDBCDriverParams:
URL: jdbc:oracle:thin://@somewhere:1521/db-node1
PasswordEncrypted: 'actualpassword`
....
'opss-data-source-1':
....
JDBCDataSourceParams:
GlobalTransactionsProtocol: None
JNDIName: jdbc/OpssDataSource-2
JDBCDriverParams:
URL: jdbc:oracle:thin://@somewhere:1521/db-node1
PasswordEncrypted: 'actualpassword`
....
'opss-data-source-2':
....
JDBCDataSourceParams:
GlobalTransactionsProtocol: None
JNDIName: jdbc/OpssDataSource-2
JDBCDriverParams:
URL: jdbc:oracle:thin://@somewhere:1521/db-node2
PasswordEncrypted: 'actualpassword`
DriverName: oracle.jdbc.OracleDriver
....
たとえば、
opss-data-source:
....
JDBCDataSourceParams:
DataSourceList: 'opss-data-source-1, opss-data-source-2'
AlgorithmType: 'FailOver'
....
フィールドの完全なリストについては、WDTコマンドを実行
modelHelp.sh -oracle_home <oracle home> resources:/JDBCSystemResource/JdbcResource/JDBCOracleParams