Return the version of the client library being used as a 5-tuple. The five values are the major version, minor version, update number, patch number and port update number.
Note
This method is an extension to the DB API definition and is only available in Oracle 10g Release 2 and higher.
Constructor for creating a cursor. Return a new Cursor object (Cursor Object) using the connection.
Note
This method is an extension to the DB API definition.
Return a string suitable for use as the dsn for the connect() method. This string is identical to the strings that are defined by the Oracle names server or defined in the tnsnames.ora file.
Note
This method is an extension to the DB API definition.
Create a session pool (see Oracle 9i documentation for more information) and return a session pool object (SessionPool Object). This allows for very fast connections to the database and is of primary use in a server where the same connection is being made multiple times in rapid succession (a web server, for example). If the connection type is specified, all calls to acquire() will create connection objects of that type, rather than the base type defined at the module level. The threaded attribute is expected to be a boolean expression which indicates whether or not Oracle should use the mode OCI_THREADED to wrap accesses to connections with a mutex. Doing so in single threaded applications imposes a performance penalty of about 10-15% which is why the default is False.
Note
This method is an extension to the DB API definition and is only available in Oracle 9i.
String constant stating the time when the binary was built.
Note
This attribute is an extension to the DB API definition.
This type object is used to describe columns in a database that are BFILEs.
Note
This attribute is an extension to the DB API definition.
This type object is used to describe columns in a database that are BLOBs.
Note
This attribute is an extension to the DB API definition.
This type object is used to describe columns in a database that are CLOBs.
Note
This attribute is an extension to the DB API definition.
This type object is used to describe columns in a database that are cursors (in PL/SQL these are known as ref cursors).
Note
This attribute is an extension to the DB API definition.
This constant is used in database shutdown to indicate that the program should not wait for current calls to complete or for users to disconnect from the database. Use only in unusual circumstances since database recovery may be necessary upon next startup.
Note
This attribute is an extension to the DB API definition.
This constant is used in database shutdown to indicate that the instance can be truly halted. This should only be done after the database has been shut down in one of the other modes (except abort) and the database has been closed and dismounted using the appropriate SQL commands. See the method shutdown() in the section on connections (Connection Object).
Note
This attribute is an extension to the DB API definition.
This constant is used in database shutdown to indicate that all uncommitted transactions should be rolled back and any connected users should be disconnected.
Note
This attribute is an extension to the DB API definition.
This constant is used in database shutdown to indicate that further connections should be prohibited and no new transactions should be allowed. It then waits for active transactions to complete.
Note
This attribute is an extension to the DB API definition.
This constant is used in database shutdown to indicate that further connections should be prohibited and no new transactions should be allowed. It then waits for only local active transactions to complete.
Note
This attribute is an extension to the DB API definition.
This type object is used to describe columns in a database that are fixed length strings (in Oracle this is CHAR columns); these behave differently in Oracle than varchar2 so they are differentiated here even though the DB API does not differentiate them.
Note
This attribute is an extension to the DB API definition.
This constant is used to register callbacks on the OCIBindByName() function of the OCI.
Note
This attribute is an extension to the DB API definition.
This constant is used to register callbacks on the OCIBindByPos() function of the OCI.
Note
This attribute is an extension to the DB API definition.
This constant is used to register callbacks on the OCIDefineByPos() function of the OCI.
Note
This attribute is an extension to the DB API definition.
This constant is used to register callbacks on the OCIStmtExecute() function of the OCI.
Note
This attribute is an extension to the DB API definition.
This constant is used to register callbacks on the OCIStmtFetch() function of the OCI.
Note
This attribute is an extension to the DB API definition.
This constant is used to register callbacks on the OCIStmtPrepare() function of the OCI.
Note
This attribute is an extension to the DB API definition.
This type object is the Python type of BLOB and CLOB data that is returned from cursors.
Note
This attribute is an extension to the DB API definition.
This type object is used to describe columns in a database that are long binary (in Oracle these are LONG RAW columns).
Note
This attribute is an extension to the DB API definition.
This type object is used to describe columns in a database that are long strings (in Oracle these are LONG columns).
Note
This attribute is an extension to the DB API definition.
This type object is used to describe columns in a database that are of type binary_double or binary_float and is only available in Oracle 10g.
Note
This attribute is an extension to the DB API definition.
This type object is used to describe columns in a database that are NCLOBs.
Note
This attribute is an extension to the DB API definition.
This type object is used to describe columns in a database that are objects.
Note
This attribute is an extension to the DB API definition.
This constant is used to define the preliminary authentication mode required for performing database startup and shutdown.
Note
This attribute is an extension to the DB API definition.
This constant is used to define the “get” mode on session pools and indicates that a new connection will be returned if there are no free sessions available in the pool.
Note
This attribute is an extension to the DB API definition.
This constant is used to define the “get” mode on session pools and indicates that an exception is raised if there are no free sessions available in the pool.
Note
This attribute is an extension to the DB API definition.
This constant is used to define the “get” mode on session pools and indicates that the acquisition of a connection waits until a session is freed if there are no free sessions available in the pool.
Note
This attribute is an extension to the DB API definition.
Value to be passed to the connect() method which indicates that SYSDBA access is to be acquired. See the Oracle documentation for more details.
Note
This attribute is an extension to the DB API definition.
Value to be passed to the connect() method which indicates that SYSOPER access is to be acquired. See the Oracle documentation for more details.
Note
This attribute is an extension to the DB API definition.
Integer constant stating the level of thread safety that the interface supports. Currently 2, which means that threads may share the module and connections, but not cursors. Sharing means that a thread may use a resource without wrapping it using a mutex semaphore to implement resource locking.
Note that in order to make use of multiple threads in a program which intends to connect and disconnect in different threads, the threaded argument to the Connection constructor must be a true value. See the comments on the Connection constructor for more information (Module Interface).
This type object is used to describe columns in a database that are timestamps.
Note
This attribute is an extension to the DB API definition and is only available in Oracle 9i.
This constant is used to register callbacks on entry to the function of the OCI. In other words, the callback will be called prior to the execution of the OCI function.
Note
This attribute is an extension to the DB API definition.
This constant is used to register callbacks on exit from the function of the OCI. In other words, the callback will be called after the execution of the OCI function.
Note
This attribute is an extension to the DB API definition.
This constant is used to register callbacks that completely replace the call to the OCI function.
Note
This attribute is an extension to the DB API definition.
String constant stating the version of the module. Currently ‘4.4.1‘.
Note
This attribute is an extension to the DB API definition.
Note
PEP 249 (Python Database API Specification v2.0) says the following about exception values:
[...] The values of these exceptions are not defined. They should give the user a fairly good idea of what went wrong, though. [...]
With cx_Oracle every exception object has exactly one argument in the args tuple. This argument is a cx_Oracle._Error object which has the following three read-only attributes.
This allows you to use the exceptions for example in the following way:
import sys
import cx_Oracle
connection = cx_Oracle.Connection("user/pw@tns")
cursor = connection.cursor()
try:
cursor.execute("select 1 / 0 from dual")
except cx_Oracle.DatabaseError, exc:
error, = exc.args
print >> sys.stderr, "Oracle-Error-Code:", error.code
print >> sys.stderr, "Oracle-Error-Message:", error.message