-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Labels
Client Library or DatabaseAn issue with Oracle Client library or Oracle DatabaseAn issue with Oracle Client library or Oracle DatabasebugSomething isn't workingSomething isn't working
Description
oracledb.connect
works as expected with AUTH_MODE_SYSDBA
.
oracledb.create_pool
also accepts mode=oracledb.AUTH_MODE_SYSDBA
but it does not seem to make a difference. I still get:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
Thanks!
-
What versions are you using?
Oracle Database 23ai Free Release 23.0.0.0.0 - Version 23.5.0.24.07
platform.platform: Linux-4.18.0-348.el8.x86_64-x86_64-with-glibc2.28
sys.maxsize > 2**32: True
platform.python_version: 3.10.2
oracledb.version: 2.5.1 -
Is it an error or a hang or a crash?
Error -
What error(s) or behavior you are seeing?
Traceback (most recent call last):
File "test_oracle.py", line 10, in <module>
pool.acquire()
File ".../site-packages/oracledb/pool.py", line 406, in acquire
return oracledb.connect(
File ".../site-packages/oracledb/connection.py", line 1194, in connect
return conn_class(dsn=dsn, pool=pool, params=params, **kwargs)
File ".../site-packages/oracledb/connection.py", line 579, in __init__
impl.connect(params_impl, pool_impl)
File "src/oracledb/impl/thick/connection.pyx", line 502, 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-28009: connection as SYS should be as SYSDBA or SYSOPER
-
Does your application call init_oracle_client()?
Yes, thick mode. -
Include a runnable Python script that shows the problem.
import oracledb
oracledb.init_oracle_client() # Switch to thick mode
sys_dsn = <identifier from tnsnames.ora>
# Works as expected
oracledb.connect(sys_dsn, mode=oracledb.AUTH_MODE_SYSDBA, externalauth=True)
pool = oracledb.create_pool(sys_dsn, mode=oracledb.AUTH_MODE_SYSDBA, externalauth=True, homogeneous=False)
pool.acquire()
# oracledb.exceptions.DatabaseError: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
Metadata
Metadata
Assignees
Labels
Client Library or DatabaseAn issue with Oracle Client library or Oracle DatabaseAn issue with Oracle Client library or Oracle DatabasebugSomething isn't workingSomething isn't working