I'm quite desperate, I just created a new Oracle Database following this steps with sys and system password "oracle". Creation finished successfully but when I try to connect remotely to this database.
Via SQLDeveloper I got an error
ORA-01017 invalid username/password denied
And works fine for user scott/tiger (manually created and granted connect permission).
Newly created instance is TEST. If I connect via sqlplus / works fine
$ ORACLE_SID=TEST
$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Fri Jun 5 19:32:52 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
SQL>
When I try to connect saying username/password doesn't connect
$ ORACLE_SID=TEST
$ sqlplus sys/oracle@TEST as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Fri Jun 5 19:35:30 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Enter user-name:
But the listener apparently knows the new instance
$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 05-JUN-2020 19:37:06
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 05-JUN-2020 18:56:57
Uptime 0 days 0 hr. 40 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/d69dcf11a559/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=d69dcf11a559)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=d69dcf11a559)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "TEST" has 1 instance(s).
Instance "TEST", status READY, has 1 handler(s) for this service...
Service "TESTXDB" has 1 instance(s).
Instance "TEST", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully