- administrative user is ADMIN on the Oracle Cloud databases and SYSTEM on local databases (SYSDBA is not available on the Oracle Cloud database) - use dbms_session.sleep() instead of dbms_lock.sleep() where possible - environment variables CX_ORACLE_SAMPLES_SYSDBA_USER and CX_ORACLE_SAMPLES_SYSDBA_PASSWORD are replaced with CX_ORACLE_SAMPLES_ADMIN_USER and CX_ORACLE_SAMPLES_ADMIN_PASSWORD - new environment variable CX_ORACLE_SAMPLES_DRCP_CONNECT_STRING used for specifying the connect string to use for DRCP usage
This directory contains samples for cx_Oracle.
-
The schemas and SQL objects that are referenced in the samples can be created by running the Python script SetupSamples.py. The script requires SYSDBA privileges and will prompt for these credentials as well as the names of the schemas and edition that will be created, unless a number of environment variables are set as documented in the Python script SampleEnv.py. Run the script using the following command:
python SetupSamples.pyAlternatively, the SQL script can be run directly via SQL*Plus, which will always prompt for the names of the schemas and edition that will be created.
sqlplus sys/syspassword@hostname/servicename @sql/SetupSamples.sql -
Run a Python script, for example:
python Query.py -
After running cx_Oracle samples, the schemas and SQL objects can be dropped by running the Python script DropSamples.py. The script requires SYSDBA privileges and will prompt for these credentials as well as the names of the schemas and edition that will be dropped, unless a number of environment variables are set as documented in the Python script SampleEnv.py. Run the script using the following command:
python DropSamples.pyAlternatively, the SQL script can be run directly via SQL*Plus, which will always prompt for the names of the schemas and edition that will be dropped.
sqlplus sys/syspassword@hostname/servicename @sql/DropSamples.sql