sqlplus myusername/mypassword@ORCL not working with Oracle on Docker

29 views Asked by At

I am following this tutorial to run Oracle in a Docker image https://oralytics.com/2021/10/01/oracle-21c-xe-database-and-docker-setup/

I already have the image and now I should run

sqlplus system/SysPassword1@//localhost/XEPDB1

But this commands triggers a username and password ask (as on the image below), and when I try to put these information as:

  • username: system
  • password: SysPassword1@ (also tried "SysPassword1@" and SysPassword1)

it does not work with the following error

    SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
      <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
Enter user-name: system  
Enter password: 
ERROR:
    ORA-12162: TNS:net service name is incorrectly specified

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

Don't know what to do here. enter image description here

0

There are 0 answers