thick mode connect isn't honoring TNS_ADMIN or using ldap connection
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Bắt đầu với test.py có thể chạy được và lệnh gọi init_oracle_client(), sau đó so sánh cách kết nối sử dụng TNS_ADMIN, sqlnet.ora và ldap.ora với cấu hình sqlplus đang hoạt động. Tái hiện lỗi ORA-12154 và theo dõi đường dẫn kết nối Thick-mode; hoàn tất khi ldap_alias kết nối bằng cấu hình LDAP trong /opt/oracle mà không yêu cầu tnsnames.ora.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- What versions are you using?
platform.platform: macOS-15.0-arm64-arm-64bit
sys.maxsize > 2**32: True
platform.python_version: 3.12.6
oracledb.version: 2.4.1
- Is it an error or a hang or a crash?
Error
- What error(s) or behavior you are seeing?
When trying to connect to a database I'm getting the following error:
$ env | grep -E 'ORA|TNS|PATH'
TNS_ADMIN=/opt/oracle
PATH=/opt/oracle/instantclient_23_3:...
INFOPATH=/opt/homebrew/share/info:
ORACLE_HOME=/opt/oracle/instantclient_23_3
$ python test.py
Traceback (most recent call last):
File "/Users/slords/test.py", line 8, in
c=oracledb.connect(user=user, password=password, dsn=dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/slords/.venv/lib/python3.12/site-packages/oracledb/connection.py", line 1169, in connect
return conn_class(dsn=dsn, pool=pool, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/slords/.venv/lib/python3.12/site-packages/oracledb/connection.py", line 554, in init
impl.connect(params_impl, pool_impl)
File "src/oracledb/impl/thick/connection.pyx", line 494, in oracledb.thick_impl.ThickConnImpl.connect
File "src/oracledb/impl/thick/utils.pyx", line 446, in oracledb.thick_impl._raise_from_info
oracledb.exceptions.DatabaseError: ORA-12154: Cannot connect to database. Could not find alias whse_dev in /opt/oracle/instantclient_23_3/network/admin/tnsnames.ora.
Help: https://docs.oracle.com/error-help/db/ora-12154/
If I run the same connect using sqlplus it connects fine to the database. I've got sqlnet.ora and ldap.ora in /opt/oracle. We don't use tnsnames.ora and that file has never existed in any of our installs.
- Does your application call init_oracle_client()?
Yes
- Include a runnable Python script that shows the problem.
$ cat test.py
import oracledb
oracledb.init_oracle_client(lib_dir='/opt/oracle/instantclient_23_3')
user='user'
password='pass'
dsn='ldap_alias'
c=oracledb.connect(user=user, password=password, dsn=dsn)
- Ngôn ngữ chính
- Python
- Star
- 455
- Fork
- 119
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của oracle/python-oracledb
-
Client Library or Database
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
oracle/python-oracledb#620 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
oracle/python-oracledb#619 ·
-
asyncio: DPY-4011 on connect_async() when the listener closes the original socket after a redirectCó thể đã có người làm @AlexGracas đã nhận 8 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
oracle/python-oracledb#616 ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
oracle/python-oracledb#615 ·
-
Fetch character columns as raw bytes in the database character set into data frames (Thick mode)Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
oracle/python-oracledb#614 · 1 bình luận ·
Tất cả issue của oracle/python-oracledb
Issue tương tự
-
`LazyFrameRemote` and `ExecuteRemote` sinks do not accept `Path`, like `LazyFrame` sinks do.Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
WingedGuardian/GENesis-AGI#3375 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
curriculum documentation quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
githubnext/gh-aw-workshop#4601 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
approved Good First Issue scope: docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
hiero-ledger/hiero-sdk-python#2730 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày