Unable to connect using SQLplus after installation of Oracle.
[oracle@78787~]$ sqlplus SYS/Oracle_1@cdb1 AS SYSDBA
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Dec 29 11:38:40 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Adding few more details
I get connected after getting the error and giving the username and password again, like below. The console prompts for entering username and password again.
[oracle@78787~]$ sqlplus SYS/Oracle_1@cdb1 AS SYSDBA
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Dec 29 12:11:31 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
ERROR:
**ORA-12154: TNS:could not resolve the connect identifier specified**
Enter user-name: SYS as SYSDBA
Enter password:
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> exit;
I do not find tnsnames.ora file and sqlnet.ora in the below path, but those are inside samples. And the ones inside samples looks like sample files, with most lines commented.
ls -lrt $ORACLE_HOME/network/admin
total 4
-rw-r--r--. 1 oracle oinstall 1536 Feb 13 2018 shrept.lst
drwxr-xr-x. 2 oracle oinstall 64 Dec 29 07:01 samples