Thanks for the question, Tony.
Asked: May 10, 2023 - 5:54 pm UTC
Last updated: May 16, 2023 - 3:14 am UTC
Version: 21c
Viewed 100+ times
You Asked
Hello Team,
I am new to Oracle and I have recently installed oracle-21c in Centos. The installation was successful , but During installation password was automatically generated. But now when i try to run sqlplus / as sysdba, its repeatedly asking me for the password which i don't have. How to fix this?
[tony@instance-7 ~]$ sqlplus / as sysdba
SQL*Plus: Release 21.0.0.0.0 - Production on Wed May 10 17:51:55 2023
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
and Connor said...
Most likely your ORACLE_SID is not set. During installation you were probably prompted for a local bin directory, which will now contain "oraenv, coraenv, dbhome" scripts.
Thus typically your shell profile should be amended to something like
PATH=$PATH:/usr/local/bin
export PATH
ORACLE_SID=mysid
export ORACLE_SID
ORAENV_ASK=NO . oraenv
which will set up the required environment