-
Notifications
You must be signed in to change notification settings - Fork 91
Description
-
What versions are you using?
platform.platform: Linux-3.10.0-1160.99.1.el7.x86_64-x86_64-with-glibc2.2.5
sys.maxsize > 2**32: True
platform.python_version: 3.8.14
oracledb.version: 1.4.2
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 -
Is it an error or a hang or a crash?
Error. -
What error(s) or behavior you are seeing?
I'm able to execute select sql on one of my database, but on the same server, I'm not able to execute the same sql on the other database which I actually want.
It's similiar to this issue: Thin mode ORA-01017: invalid username/password with 12.1.0.2 #26.
But it's weird because the database that I can't connect has this setting:
sec_case_sensitive_logon=TRUE -
Does your application call init_oracle_client()?
No. I'm using thin mode. -
Include a runnable Python script that shows the problem.
I'm very sorry there are some unnecessary information I need to hide, I replaced them with xxx.
bash-4.25 /opt/rh/rh-python38/root/usr/bin/python3.8 insert.py --ods_db db_able_to_connect
select table:
select * from dis 1017
(1. 'Summer Promotion'; 9.5, datetime.datetime(2017, 5, 1, 0, 0), datetime,datetime(2017, 8, 31, 0, 0)
bash-4.25 /opt/rh/rh-python38/root/usr/bin/python3.8 insert.py --ods_db db_not_able_to_connect
Traceback (most recent call last):
File "insert.py", line 85, in ‹module>
main(vars(args))
File "insert.py", line 76, in main select_table(args.ods_db, SELECT_SQL)
File "insert.py", line 36, in select_table
ods_conn = get_oracle_conn(ods_ab)
File "/xxx/oracle_util.py". line 11, in get_oracle_conn
return oracledb.connect(user=db infol'user'], password=db_infol'password'],
File "/home/xxx/local/lib/python3.8/site-packages/oracledb/connection.py", line 1020, in connect return conn_class(dsn=dsn, pool=pool, params=params, **kwargs)
File "/home/xxx/local/lib/python3.8/site-packages/oracledb/connection.py", line 130, in _init_ impl.connect(params_impl)
File "src/oracledb/impl/thin/connection.pyx", line 338, in oracledb.thin impl.ThinConnImpl.connect File "src/oracledb/impl/thin/connection.pyx", line 328, in oracledb.thin_impl.ThinConnImpl.connect File "src/oracledb/impl/thin/connection.pyx", line 215, in oracledb.thin_impl.ThinConnImpl. connect_with_params File "src/oracledb/impl/thin/connection.pyx", line 186, in oracledb.thin impl.ThinConnImpl._connect _with_description File "src/oracledb/impl/thin/connection.pyx", line 127, in oracledb.thin_impl.ThinConnImplconnect_with_address
File "src/oracledb/impl/thin/protocol.pyx", line 266, in oracledb.thin impl.Protocol. _connect_phase_two File "src/oracledb/impl/thin/protocol.pyx", line 381, in oracledb.thin impl.Protocol._process_message File "src/oracledb/impl/thin/protocol.pyx", line 358, in oracledb.thin impl.Protocol. process_message File "src/oracledb/impl/thin/messages.pyx", line 297, in oracledb.thin impl.Message.send File "src/oracledb/impl/thin/messages.pyx", line 1597, in oracledb.thin impl.AuthMessage. write message File "/home/xxx/local/lib/python3.8/site-packages/oracledb/errors.py", line 127, in _raise_err raise exc_typeError(message)) from cause
**oracledb.exceptions.NotSupportedError: DPY-3015: password verifier type 0x939 is not supported by python-oracledb in thin mode**
#################################################################
#!/opt/rh/rh-python38/root/usr/bin/python3.8
#-*- coding:utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import argparse
from utils.oracle_util import get_oracle_conn
def select_table(ods_db: str, sql):
ods_conn = get_oracle_conn(ods_db)
with ods_conn as connection:
with connection.cursor0 as cursor:
print("select table: ")
print(sql)
for row in cursor.execute(sql):
print(row)
connection.commit()
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--instance')
parser.add_argument('--ods_db')
user_input = parser.parse_args()
return user_input
def main(params):
for var, value in params.items():
setattr(args, var, value)
SELECT_SQL = '''select * from dis_1017'''
select_table(args.ods_db, SELECT_SQL)
#/opt/rh/rh-python38/root/usr/bin/python3.8 insert_example.py --ods_db db_able_to_connect
#/opt/rh/rh-python38/root/usr/bin/python3.8 insert_example.py-ods_db db_not_able_to_connect
if __name__ =='__main__':
args = parse_args()
main(vars(args))