Skip to Main Content
  • Questions
  • i am not able to login to sqlplus / as sysdba


Question and Answer

Connor McDonald

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 - Production on Wed May 10 17:51:55 2023

Copyright (c) 1982, 2021, Oracle. All rights reserved.

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

export PATH


ORAENV_ASK=NO . oraenv

which will set up the required environment

More to Explore


Need more information on Administration? Check out the Administrators guide for the Oracle Database