Oracle
https://docs.oracle.com/database/oracle/oracle-database
This backend is experimental and is subject to backwards incompatible changes.
Install
Install Ibis and dependencies for the Oracle backend:
Install with the oracle
extra:
pip install 'ibis-framework[oracle]'
And connect:
import ibis
= ibis.oracle.connect() con
- 1
- Adjust connection parameters as needed.
Install for Oracle:
conda install -c conda-forge ibis-oracle
And connect:
import ibis
= ibis.oracle.connect() con
- 1
- Adjust connection parameters as needed.
Install for Oracle:
mamba install -c conda-forge ibis-oracle
And connect:
import ibis
= ibis.oracle.connect() con
- 1
- Adjust connection parameters as needed.
Connect
ibis.oracle.connect
= ibis.oracle.connect(
con ="username",
user="password",
password="hostname",
host=1521,
port="database",
database )
ibis.oracle.connect
is a thin wrapper around ibis.backends.oracle.Backend.do_connect
.
Connection Parameters
do_connect
do_connect(self, *, user, password, host='localhost', port=1521, database=None, sid=None, service_name=None, dsn=None, **_)
Create an Ibis client using the passed connection parameters.
Parameters
Name | Type | Description | Default |
---|---|---|---|
user |
str | Username | required |
password |
str | Password | required |
host |
str | Hostname | 'localhost' |
port |
int | Port | 1521 |
database |
str | None | Used as an Oracle service name if provided. | None |
sid |
str | None | Unique name of an Oracle Instance, used to construct a DSN if provided. | None |
service_name |
str | None | Oracle service name, used to construct a DSN if provided. Only one of database and service_name should be provided. | None |
dsn |
str | None | An Oracle Data Source Name. If provided, overrides all other connection arguments except username and password. | None |
ibis.connect
URL format
In addition to ibis.oracle.connect
, you can also connect to Oracle by passing a properly formatted Oracle connection URL to ibis.connect
= ibis.connect(f"oracle://{user}:{password}@{host}:{port}/{database}") con
Connecting to older Oracle databases
ibis
uses the python-oracledb
“thin client” to connect to Oracle databases. Because early versions of Oracle did not perform case-sensitive checks in passwords, some DBAs disable case sensitivity to avoid requiring users to update their passwords. If case-sensitive passwords are disabled, then Ibis will not be able to connect to the database.
To check if case-sensitivity is enforced you can run
show parameter sec_case_sensitive_logon;
If the returned value is FALSE
then Ibis will not connect.
For more information, see this issue.