Connecting To Oracle Database: Difference between revisions

From Alpine Linux
(Add Oracle database connection instructions)
 
(Clarify libc issue)
Line 1: Line 1:
Connecting to a Oracle database does not seem to be possible due to the driver being compiled for GNU libc and it being proprietary. It is possible to connect to a database using Docker however. The image is proprietary, so a <code>docker login</code> is required and the "Proceed to Checkout" on https://hub.docker.com/_/oracle-instant-client has to be went through.
Connecting to a Oracle database directly does not seem to be possible due to the driver being compiled for GNU libc and it being proprietary. It is possible to connect to a database using Docker however. The image is proprietary as well, so a <code>docker login</code> is required and the "Proceed to Checkout" on https://hub.docker.com/_/oracle-instant-client has to be went through.


== Connecting with <code>okli</code> ==
== Connecting with <code>okli</code> ==

Revision as of 12:08, 20 October 2020

Connecting to a Oracle database directly does not seem to be possible due to the driver being compiled for GNU libc and it being proprietary. It is possible to connect to a database using Docker however. The image is proprietary as well, so a docker login is required and the "Proceed to Checkout" on https://hub.docker.com/_/oracle-instant-client has to be went through.

Connecting with okli

okcli is a libre CLI to access a Oracle database. You can connect using it with the following command:

<source lang="bash">
docker run -it -e LC_CTYPE=en_US.UTF-8 store/oracle/database-instantclient:12.2.0.1 sh -c "yum install -y python3-pip && pip3 install okcli && okcli 'myusername/mypassword@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=141.62.75.20)(Port=1521))(CONNECT_DATA=(SID=DB1)))'"
</source>

Connecting with SQL Plus

SQL Plus is the proprietary CLI to access a Oracle database. You can connect using it with the following command:

<source lang="bash">
docker run -it -e LC_CTYPE=en_US.UTF-8 store/oracle/database-instantclient:12.2.0.1 sqlplus 'myusername/mypassword@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=141.62.75.20)(Port=1521))(CONNECT_DATA=(SID=DB1)))'
</source>