Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to execute a sql file in Docker Oracle 12?

How can I execute a sql file in Docker Oracle 12c (here is the link of the image) , where is the /u0p/app/oracle/scripts or how can I set the permits to docker/oracle to execute this file? [I'm in Debian]

I tried to look for the cd /home/oracle but I can't find this as root user.

Any idea?

like image 239
Sr Jefers Avatar asked Nov 07 '22 07:11

Sr Jefers


1 Answers

Follow this link to install an Oracle 12c Docker image. I installed it on my Mac.

https://dzone.com/articles/creating-an-oracle-database-docker-image

Download the Oracle Instant Client which includes SQL* Plus.

OR

Download the latest command line tool SQLcl

Now, to run a script you may Connect to your database using the easy connect with sqlplus or sql commandline.

sqlplus user/pwd@//localhost:1521/ORCLPDB1 yourpath/yourscript.sql
like image 124
Kaushik Nayak Avatar answered Nov 15 '22 06:11

Kaushik Nayak