OCI_ADBのwalletを新しくしろと言われたので再セットアップした

Walletファイルを再ダウンロードしろというメールが来た

こんなメールが来るようになった。
期日までにWallet.zipを新しくしないと接続出来なくなるよというもの。
(G1 ルート証明書が廃止されG2 ルート証明書になるらしい。あまりわかってない。 )
image-618.png

なので再ダウンロードする。

OCIコンソール

Oracle AI Database> Autonomous AI Databases > (DB名)をクリック

左上にあるDatabase connectionボタンを押す

↓Wallet typeはRegional walletを選択した(リージョン内の全DBにログインできるWallet)

image-619.png

パスワード設定してDownload

image-620.png

Oracle ClientのWalletファイルを入れ替える

$ORACLE_HOME/network/admin配下に展開しているので、バックアップフォルダを作って既存ファイルをバックアップ(bk_20260411_wallet)

※tnsnames.ora、sqlnet.oraは置き換える必要ない。(今回ミスって置き換えちゃったので再作成した)

/u01/app/oracle/product/23.5.0/client_1/network/admin

  

[oracle@backup admin]$ ls -ltr

合計 76

-rw-r--r-- 1 oracle oinstall 3021 4月 11 12:46 truststore.jks

-rw-r--r-- 1 oracle oinstall 2620 4月 11 12:46 tnsnames.ora

-rw-r----- 1 oracle oinstall 114 4月 11 12:46 sqlnet.ora

-rw-r--r-- 1 oracle oinstall 691 4月 11 12:46 ojdbc.properties

-rw-r--r-- 1 oracle oinstall 3190 4月 11 12:46 keystore.jks

-rw-r--r-- 1 oracle oinstall 7097 4月 11 12:46 ewallet.pem

-rw-r--r-- 1 oracle oinstall 6312 4月 11 12:46 ewallet.p12

-rw-r--r-- 1 oracle oinstall 6357 4月 11 12:46 cwallet.sso

-rw-r--r-- 1 oracle oinstall 2712 4月 11 12:46 README

-rw-r--r-- 1 oracle oinstall 25288 4月 11 21:46 Wallet_dbfree26ai.zip

drwxr-xr-x 2 oracle oinstall 218 4月 11 21:52 bk_20260411_wallet

-rw------- 1 oracle oinstall 0 4月 11 21:57 ewallet.p12.lck

-rw------- 1 oracle oinstall 0 4月 11 21:57 cwallet.sso.lck

[oracle@backup admin]$

外部パスワードストアとしても使ってるので新しいwalletファイルにクレデンシャル情報を再登録 ※パスワードはマスクしてます。

[oracle@backup admin]$ orapki secretstore create_credential -wallet $ORACLE_HOME/network/admin -pwd WalPass_1234# -connect_string ADB_HR -username HR -password UserPass_1234#

Oracle PKI Tool Release 23.0.0.0.0 - Production

23.0.0.0.0: バージョン{1}

Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.

  

操作は正常に完了しました。

[oracle@backup admin]$ orapki secretstore list_credentials -wallet $ORACLE_HOME/network/admin -pwd WalPass_1234#

Oracle PKI Tool Release 23.0.0.0.0 - Production

23.0.0.0.0: バージョン{1}

Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.

  

List credential (index: connect_string username)

1: ADB_HR HR

[oracle@backup admin]$ orapki secretstore create_credential -wallet $ORACLE_HOME/network/admin -pwd WalPass_1234# -connect_string ADB_SH -username SH2 -password UserPass_1234#

Oracle PKI Tool Release 23.0.0.0.0 - Production

23.0.0.0.0: バージョン{1}

Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.

  

操作は正常に完了しました。

[oracle@backup admin]$ orapki secretstore create_credential -wallet $ORACLE_HOME/network/admin -pwd WalPass_1234# -connect_string ADB_CO -username CO -password WalPass_1234#

Oracle PKI Tool Release 23.0.0.0.0 - Production

23.0.0.0.0: バージョン{1}

Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.

  

操作は正常に完了しました。

[oracle@backup admin]$ orapki secretstore create_credential -wallet $ORACLE_HOME/network/admin -pwd WalPass_1234# -connect_string ADB_26HR -username HR -password WalPass_1234#

Oracle PKI Tool Release 23.0.0.0.0 - Production

23.0.0.0.0: バージョン{1}

Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.

  

操作は正常に完了しました。

[oracle@backup admin]$ orapki secretstore create_credential -wallet $ORACLE_HOME/network/admin -pwd WalPass_1234# -connect_string ADB_26SH -username SH2 -password UserPass_1234#

Oracle PKI Tool Release 23.0.0.0.0 - Production

23.0.0.0.0: バージョン{1}

Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.

  

操作は正常に完了しました。

[oracle@backup admin]$ orapki secretstore create_credential -wallet $ORACLE_HOME/network/admin -pwd WalPass_1234# -connect_string ADB_26CO -username CO -password UserPass_1234#

Oracle PKI Tool Release 23.0.0.0.0 - Production

23.0.0.0.0: バージョン{1}

Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.

  

操作は正常に完了しました。

[oracle@backup admin]$

  

  

[oracle@backup admin]$ orapki secretstore list_credentials -wallet $ORACLE_HOME/network/admin -pwd WalPass_1234#

Oracle PKI Tool Release 23.0.0.0.0 - Production

23.0.0.0.0: バージョン{1}

Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.

  

List credential (index: connect_string username)

6: ADB_26CO CO

5: ADB_26SH SH2

4: ADB_26HR HR

3: ADB_CO CO

2: ADB_SH SH2

1: ADB_HR HR

[oracle@backup admin]$

消してしまったtntnsnames.oraとsqlnet.oraにエントリーを再登録

  • sqlnet.oraはSQLNET.WALLET_OVERRIDE=trueを追加
  • tnsnames.oraはDB名_highをコピーして、↑外部パスワードストアとして登録した接続子を全部追加 ※サービス名はマスクしてます。
[oracle@backup admin]$ cat sqlnet.ora

WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY="?/network/admin")))

SSL_SERVER_DN_MATCH=yes

SQLNET.WALLET_OVERRIDE=true  ←これを追加

[oracle@backup admin]$

  

[oracle@backup admin]$ cat tnsnames.ora

dbfree26ai_high = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree26ai_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

  

dbfree26ai_medium = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree26ai_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

  

dbfree26ai_low = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree26ai_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

  

dbfree26ai_tp = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree26ai_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

  

dbfree26ai_tpurgent = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree26ai_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

  

  

ADB_26HR = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree26ai_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

ADB_26SH = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree26ai_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

ADB_26CO = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree26ai_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

  

dbfree23ai_high = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree23ai_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

  

dbfree23ai_medium = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree23ai_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

  

dbfree23ai_low = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree23ai_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

  

dbfree23ai_tp = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree23ai_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

  

dbfree23ai_tpurgent = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree23ai_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

  

  

  

ADB_HR = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree23ai_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

ADB_SH = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree23ai_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

ADB_CO = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=xxxxxxxxxxxxxx_dbfree23ai_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

[oracle@backup admin]$

パスワードレスで接続できるか確認

[oracle@backup admin]$ sqlplus /@ADB_HR

  

SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on 土 4月 11 22:17:10 2026

Version 23.5.0.24.07

  

Copyright (c) 1982, 2024, Oracle. All rights reserved.

  

最終正常ログイン時間: 土 4月 11 2026 22:13:29 +09:00

  

  

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0

に接続されました。

SQL> exit

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0との接続が切断されました。

[oracle@backup admin]$ sqlplus /@ADB_SH

  

SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on 土 4月 11 22:17:16 2026

Version 23.5.0.24.07

  

Copyright (c) 1982, 2024, Oracle. All rights reserved.

  

最終正常ログイン時間: 土 4月 11 2026 22:16:22 +09:00

  

  

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0

に接続されました。

SQL> exit

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0との接続が切断されました。

[oracle@backup admin]$ sqlplus /@ADB_CO

  

SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on 土 4月 11 22:17:21 2026

Version 23.5.0.24.07

  

Copyright (c) 1982, 2024, Oracle. All rights reserved.

  

最終正常ログイン時間: 日 1月 04 2026 05:58:20 +09:00

  

  

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0

に接続されました。

SQL> exit

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0との接続が切断されました。

[oracle@backup admin]$ sqlplus /@ADB_26HR

  

SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on 土 4月 11 22:17:32 2026

Version 23.5.0.24.07

  

Copyright (c) 1982, 2024, Oracle. All rights reserved.

  

最終正常ログイン時間: 日 1月 04 2026 05:40:32 +09:00

  

  

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0

に接続されました。

SQL> exit

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0との接続が切断されました。

[oracle@backup admin]$ sqlplus /@ADB_26SH

  

SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on 土 4月 11 22:17:37 2026

Version 23.5.0.24.07

  

Copyright (c) 1982, 2024, Oracle. All rights reserved.

  

最終正常ログイン時間: 土 4月 11 2026 09:10:04 +09:00

  

  

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0

に接続されました。

SQL> exit

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0との接続が切断されました。

[oracle@backup admin]$ sqlplus /@ADB_26CO

  

SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on 土 4月 11 22:17:43 2026

Version 23.5.0.24.07

  

Copyright (c) 1982, 2024, Oracle. All rights reserved.

  

  

  

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0

に接続されました。

SQL> exit

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.2.0 - Production

Version 23.26.1.2.0との接続が切断されました。

[oracle@backup admin]$

`

その他ローカルPC上のOracle Client(SQL Develoer)用にWalletを配置しなおしたり、いろいろADBにつないでるツール類のを置きなおしたりした。

以上、終わり。