File: connect_drcp.py

package info (click to toggle)
python-cx-oracle 8.3.0-3
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm, sid
  • size: 3,276 kB
  • sloc: ansic: 10,406; python: 9,358; sql: 1,724; makefile: 31
file content (14 lines) | stat: -rw-r--r-- 676 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#------------------------------------------------------------------------------
# connect_drcp.py (Section 2.3 and 2.5)
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
#------------------------------------------------------------------------------

import cx_Oracle
import db_config

con = cx_Oracle.connect(db_config.user, db_config.pw, db_config.dsn + ":pooled",
                        cclass="PYTHONHOL", purity=cx_Oracle.ATTR_PURITY_SELF)
print("Database version:", con.version)