receiving ORA-12154 error while trying to connect with sys/password@protect as sysdba
search cancel

receiving ORA-12154 error while trying to connect with sys/password@protect as sysdba

book

Article ID: 160040

calendar_today

Updated On:

Products

Data Loss Prevention Enforce

Issue/Introduction

Receiving ORA-12154 error while trying to connect with sys/password@protect as sysdba during fresh installation of Oracle

 

Error:- "ORA-12154: TNS:could not resolve the connect identifier specified"

 

Environment

Broadcom provided Oracle Standalone Database 

Cause

The listener.ora is created successfully with the hostname pointing to the correct Oracle Server name and the port is 1521(default).
There is no tnsnames.ora file in Oracle_Home\Network\Admin folder.

Resolution

  1. During the Oracle installation process, follow DLP documentation to run the Local Net Service Name Configuration from Oracle Net Configuration Assistant. Once the Local Net Service Name Configuration is run successfully, tnsnames.ora file is created.
  2. Verify the entries in the tnsnames.ora file
  3. After this is created, check if the LISTENER is up and running
    1. From services.msc console, check if the Oracle service is running
      If not, go to command prompt and type in
      lsnrctl reload
      lsnrctl start
    2. Verify again if the listener service is running from the services.msc console
  4. Go to command prompt again and connect sys/password@protect as sysdba
    Where password is the password of the sys user and protect is the default service name.
  5. Connection should be successful.