Attaching the screenshot of the error that I am recieving while trying to connect to oracle database instance in which is inside docker container
2
The reasons may be many hopefully your oracle database must be running on ur local host and listener service up and running to listen requests.
Please check both are running then you should be able to connect easily.
Make sure you bind the container port to the HostOS.
# we bind host_os_port:to_container_port docker container run -d -p 1521:1521 --name oracle23c -e ORACLE_PASSWORD=Welcome_#1 gvenzl/oracle-free:full-faststart # verify sudo lsof -i :1521 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME com.docke 1164 BJBRA 212u IPv6 0xdaaecd52ca51aa41 0t0 TCP *:ncube-lm (LISTEN) #login with sqlplus export TWO_TASK=localhost/FREEPDB1 echo "select sysdate;" | sqlplus -S sys/Welcome_#1 as sysdba SYSDATE ------------------- 10.07.2023 06:27:34
Best of luck!
Click here to cancel reply.
2
Answers
The reasons may be many hopefully your oracle database must be running on ur local host and listener service up and running to listen requests.
Please check both are running then you should be able to connect easily.
Make sure you bind the container port to the HostOS.
Best of luck!