Skip to content

Latest commit

 

History

History
 
 

python

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

cx_Oracle Examples

This directory contains samples for cx_Oracle. Documentation is here. A separate tutorial is here.

  1. The schemas and SQL objects that are referenced in the samples can be created by running the Python script setup_samples.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 sample_env.py. Run the script using the following command:

    python setup_samples.py
    

    Alternatively, 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/setup_samples.sql
    
  2. Run a Python script, for example:

     python query.py
    
  3. After running cx_Oracle samples, the schemas and SQL objects can be dropped by running the Python script drop_samples.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 sample_env.py. Run the script using the following command:

    python drop_samples.py
    

    Alternatively, 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/drop_samples.sql