Docker Community Forums

Share and learn in the Docker community.

Docker Oracle SP2-0310: unable to open file "LOGIN.SQL" when trying to connect from windows client side

This is a specific Oracle issue Installing & Configuring Database 18.3.0 Enterprise Edition using Docker Desktop for Windows. Please let me know if this is the wrong section.

First my environment:

λ systeminfo | findstr /B /C:“OS Name” /C:“OS Version”
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17763 N/A Build 17763

λ docker version
Client: Docker Engine - Community
Version: 19.03.5
API version: 1.40
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:22:37 2019
OS/Arch: windows/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.5
API version: 1.40 (minimum version 1.24)
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:36:50 2019
OS/Arch: windows/amd64
Experimental: false

My issue (same with SYSTEM, SYSDBA):

λ sqlplus myuser/mypwd@//localhost:1521/FOURJSPDB
SQL*Plus: Release 18.0.0.0.0 - Production on Wed Feb 26 16:16:56 2020
Version 18.3.0.0.0
Copyright © 1982, 2018, Oracle. All rights reserved.
Last Successful login time: Wed Feb 26 2020 11:23:47 -06:00
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
SP2-0310: unable to open file “LOGIN.SQL”

I understand this might not be a docker specific issue but it works for other non-docker servers

I run:
λ docker run --name oraeedb -p 1521:1521 -p 5500:5500 -e ORACLE_SID=fourjs -e ORACLE_PDB=fourjspdb -e ORACLE_PWD=mypwd -e ORACLE_CHARACTERSET=AL32UTF8 -v C:/Users/LaurentGalais/Documents/Work/DockerShared/Oracle:/opt/oracle/oradata oracle/database:18.3.0-ee

I can run the following np for my PDB user but also for SYSTEM, SYSDBA:

λ docker exec -ti oraeedb sqlplus myuser/mypwd@FOURJSPDB
SQL*Plus: Release 18.0.0.0.0 - Production on Wed Feb 26 17:21:14 2020
Version 18.3.0.0.0
Copyright © 1982, 2018, Oracle. All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

I have Oracle Instant client installed and working on my Windows 10 host.

I try creating a login.sql or updateglogin.sql under $ORACLE_HOME/sqlplus/admin, no luck

I think it might have to do with the fact that I use a windows mounted drive and also that the ‘@//localhost’ might create any issues …

I’m not an Oracle expert so I’m not sure on how to create a tns entry on the client side so I don’t have to use the complete string when I connect.

I’m looking for any guidance. Thanks in advance!