diff --git a/index.html b/index.html index 724b05f..b61c70b 100644 --- a/index.html +++ b/index.html @@ -42,10 +42,130 @@ versions 3.4 and higher. You can use cx_Oracle with Oracle 11.2, 12.1 and 12.2 client libraries. Oracle's standard client-server version interoperability allows connection to both older and newer databases. For example Oracle 12.2 client libraries can connect to Oracle -Database 11.2 or later.
+Database 11.2. +Install Python from python.org.
Install cx_Oracle using Quick Start cx_Oracle Installation.
Download cx_Oracle samples or create a script like the one below.
Locate your Oracle Database username and password, and the database
+connection string. The connection string is commonly of the format
+hostname/servicename
, using the hostname where the database is
+running, and the service name of the Oracle Database instance.
Substitute your username, password and connection string in the
+code. For downloaded examples, put these in SampleEnv.py
and SampleEnv.sql
, and then follow sample/README
to create the cx_Oracle sample schema.
+SQL scripts to create Oracle Database's common sample schemas can be
+found at github.com/oracle/db-sample-schemas
Run the Python script, for example:
+ ++python myscript.py ++
+ from __future__ import print_function + + import cx_Oracle + + # Connect as user "hr" with password "welcome" to the "oraclepdb" service running on this computer. + connection = cx_Oracle.connect("hr", "welcome", "localhost/orclpdb") + + cursor = connection.cursor() + cursor.execute(""" + SELECT first_name, last_name + FROM employees + WHERE department_id = :did AND employee_id > :eid""", + did = 50, + eid = 190) + for fname, lname in cursor: + print("Values:", fname, lname) ++ +
Issues and questions can be raised with the cx_Oracle community on +GitHub or on the mailing list.
+ +Database startup and shutdown.
Sharded Databases
Oracle Database High Availability Features, such as FAN notifications and Transaction Guard support.
The simplest way to install cx_Oracle is with pip:
-- python -m pip install cx_Oracle --upgrade --
If a binary wheel package is not available on PyPI for your -platform, the source package will be used.
- -Note that if you download a source zip file directly from GitHub -then you will also need to download an ODPI-C source zip file and -extract it inside the directory called "odpi".
- -After cx_Oracle is installed, Oracle client libraries must -also be installed and configured. These can be from Oracle Instant -Client, from a local Oracle Database, or from a full Oracle Client -installation.
- -If you need the libraries, download and unzip the Oracle Instant Client 'Basic' package for your platform and set -PATH, LD_LIBRARY_PATH, or similar platform-specific library path -loading environment. See the installation notes for ODPI-C for help.
- -Versions 11.2, 12.1 and 12.2 of the Oracle Client libraries on Linux, -Windows and macOS are supported. Users have also reported success -with other platforms.
- -If you require cx_Oracle 5.3, download a Windows installer from PyPI or use
-python -m pip install cx-oracle==5.3
to install from
-source.
Very old versions of cx_Oracle can be found in the files section at -Sourceforge.
- -- from __future__ import print_function - - import cx_Oracle - - connection = cx_Oracle.connect("hr", "welcome", "localhost/orclpdb") - - cursor = connection.cursor() - cursor.execute(""" - SELECT first_name, last_name - FROM employees - WHERE department_id = :did AND employee_id > :eid""", - did = 50, - eid = 190) - for fname, lname in cursor: - print("Values:", fname, lname) -- -For more examples, please see the samples and the test suite. You can also look at the scripts in cx_OracleTools -and the modules in -cx_PyOracleLib. - -
Issues and questions can be raised with the cx_Oracle community on -GitHub or on the mailing list.
- -