Thin mode fails with ORA-24964 when trying to open a PDB migrated from Oracle 19c to 26ai
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
まず、提供されているスクリプト test_thin.py と test_thick.py を説明されている移行済み PDB に対して実行し、その後、thin モードと thick モードにおける ALTER PLUGGABLE DATABASE test OPEN READ WRITE の処理を比較します。ORA-24964 応答の原因となっている thin モードのエントリポイントを追跡します。thin モードのコマンドがそのエラーなしで PDB を正常に開ければ完了です。
索引モデルが issue の本文から書いたものです。
説明
1. What versions are you using?
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.28.0.0.0
Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0
platform.platform: Linux-5.15.0-319.201.4.2.el8uek.x86_64-x86_64-with-glibc2.28
sys.maxsize > 2**32: True
platform.python_version: 3.12.13
oracledb.__version__: 4.0.1
2. Is it an error or a hang or a crash?
Command ALTER PLUGGABLE DATABASE test OPEN READ WRITE fails with ORA-24964: ALTER SESSION SET CONTAINER error when run in oracledb thin mode
3. What error(s) or behavior you are seeing?
First, I detach a PDB from 19c with commands:
ALTER PLUGGABLE DATABASE test UNPLUG INTO '/tmp/test.pdb';
Then I attach it to 26ai:
create pluggable database test as clone using '/tmp/test.pdb';
Finally, I'm trying to open it:
ALTER PLUGGABLE DATABASE test OPEN READ WRITE;
If I run last command using sqlplus or oracledb in thick mode, PDB gets automatically upgraded and open after 20 minutes.
If I run last command using oracledb in thin mode, last command fails with error ORA-24964 after fer seconds.
4. Does your application call init_oracle_client()?
Failing application does not call init_oracle_client(), it runs in thin mode.
I tried same command with calling init_oracle_client() and using thick mode and it worked fine.
5. Include a runnable Python script that shows the problem.
This fails:
import oracledb
# Thin mode is default
print("Running in Thin mode:", oracledb.is_thin_mode())
dsn = "hostname:1521/CDB"
connection = oracledb.connect(
user="sys",
password="password",
dsn=dsn,
mode=oracledb.SYSDBA
)
cursor = connection.cursor()
try:
cursor.execute(
"ALTER PLUGGABLE DATABASE test OPEN READ WRITE"
)
connection.commit()
print("PDB opened successfully in Thin mode")
except Exception as e:
print("Thin mode error:")
print(e)
finally:
cursor.close()
connection.close()
$ python3.12 test_thin.py
Running in Thin mode: True
Thin mode error:
ORA-24964: ALTER SESSION SET CONTAINER error
Help: https://docs.oracle.com/error-help/db/ora-24964/
This succeeds:
import oracledb
# Enable Thick mode
oracledb.init_oracle_client(
lib_dir="/u01/app/oracle/product/23/dbhome_1/lib"
)
print("Running in Thin mode:", oracledb.is_thin_mode())
dsn = "hostname:1521/CDB"
connection = oracledb.connect(
user="sys",
password="password",
dsn=dsn,
mode=oracledb.SYSDBA
)
cursor = connection.cursor()
try:
cursor.execute(
"ALTER PLUGGABLE DATABASE test OPEN READ WRITE"
)
connection.commit()
print("PDB opened successfully in Thick mode")
except Exception as e:
print("Thick mode error:")
print(e)
finally:
cursor.close()
connection.close()
$ python3.12 test_thick.py
Running in Thin mode: False
PDB opened successfully in Thick mode
- 主要言語
- Python
- スター
- 451
- フォーク
- 118
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
oracle/python-oracledb のほかの issue
-
fetch_df_batches() segfaults with fetch_decimals=True and repeated NUMBER values across batches オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
oracle/python-oracledb#608 · コメント 1 件 ·
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
oracle/python-oracledb#607 · コメント 1 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
oracle/python-oracledb#564 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
oracle/python-oracledb#502 · コメント 5 件 ·
-
bug Client Library or Database
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
oracle/python-oracledb#422 · コメント 1 件 ·
oracle/python-oracledb の issue をすべて見る
似ている issue
-
area: harness bug status: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Human-Agent-Society/reef#625 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
learningequality/kolibri#15351 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Name consistency オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eellak/triplestore#65 · コメント 1 件 ·