Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python module: cx_Oracle is oracledb now #335

Open
aliensmily opened this issue Mar 8, 2023 · 2 comments
Open

Python module: cx_Oracle is oracledb now #335

aliensmily opened this issue Mar 8, 2023 · 2 comments
Milestone

Comments

@aliensmily
Copy link

aliensmily commented Mar 8, 2023

Hi,

cx_Oracle (https://oracle.github.io/python-cx_Oracle/) is oracledb (https://oracle.github.io/python-oracledb/) now.

Please consider to support both or to upgrade the modules to oracledb.

Something like that:

try:
  import oracledb as connect_ora
except ImportError:
  oracledb_exists = False
  try:
    import cx_Oracle as connect_ora
  except ImportError:
    cx_oracle_exists = False
  else:
    cx_oracle_exists = True
else:
  oracledb_exists = True
  cx_oracle_exists = False

for using it as "sqlplus / as sysdba" we have done somthing like that:

if oracledb_exists:
	connect_ora.init_oracle_client()
	conn = connect_ora.connect(mode=connect_ora.AUTH_MODE_SYSDBA)
elif not oracledb_exists and cx_oracle_exists:    
	conn = connect_ora.connect('/', mode=connect_ora.SYSDBA)

Thanks.

@aliensmily
Copy link
Author

aliensmily commented Mar 8, 2023

made a propose for module oracle_user: master...aliensmily:ansible-oracle:patch-1

@github-actions
Copy link

github-actions bot commented Apr 9, 2023

This issue is stale because it has been open for 30 days with no activity. Auto close in 30 days.

@github-actions github-actions bot added the stale label Apr 9, 2023
@Rendanic Rendanic added this to the 4.x milestone May 7, 2023
@Rendanic Rendanic removed the stale label May 7, 2023
@Rendanic Rendanic modified the milestones: 4.0, Backlog Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants