Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ServiceAliasException: Could not enum Net Service Names: TNS-04404: no error what to do ?

RumaiyaMay 26 2015 — edited May 26 2015

I am a novice so please don't mind me asking for this help .

I have listener.ora & tnsnames.ora

when I tnsping ORADB_18 which is connection string in tnsnames.ora file It shows:

C:\Users\Administrator>tnsping ORADB_18

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 26-MAY-2015 00:04:22

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:

F:\app\Ashraful\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name

then I tried to create sqlnet.ora through netca < local net service name configuration . It results in follows:

C:\Users\Administrator>netca

Oracle Net Services Configuration:

ServiceAliasException: Could not enum Net Service Names: TNS-04404: no error

  caused by: oracle.net.config.ConfigException: TNS-04414: File error

  caused by: TNS-04605: Invalid syntax error: Unexpected char or LITERAL "ORADB" before or at  ORADB = (

ServiceAliasException: Could not enum Net Service Names: TNS-04404: no error

  caused by: oracle.net.config.ConfigException: TNS-04414: File error

  caused by: TNS-04605: Invalid syntax error: Unexpected char or LITERAL "ORADB" before or at  ORADB = (

Oracle Net Services configuration terminated by user.  The exit code is -1

Contents of Listener.ora :

# listener.ora Network Configuration File: F:\app\Ashraful\product\11.2.0\dbhome_1\network\admin\listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = ORADB)

      (ORACLE_HOME = F:\app\Ashraful\product\11.2.0\dbhome_1)

      (SID_NAME = ORADB)

    )

   

    (SID_DESC =

      (SID_NAME = CLRExtProc)

      (ORACLE_HOME = F:\app\Ashraful\product\11.2.0\dbhome_1)

      (PROGRAM = extproc)

      (ENVS = "EXTPROC_DLLS=ONLY:F:\app\Ashraful\product\11.2.0\dbhome_1\bin\oraclr11.dll")

    )

  )

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = **.**.**.**)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

  )

ADR_BASE_LISTENER = F:\app\Ashraful

Contents of tnsnames.ora :

# tnsnames.ora Network Configuration File: F:\app\Ashraful\product\11.2.0\dbhome_1\network\admin\tnsnames.ora

# Generated by Oracle configuration tools.

ORACLR_CONNECTION_DATA =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

    (CONNECT_DATA =

      (SID = CLRExtProc)

      (PRESENTATION = RO)

    )

  )

 

  ORADB_18 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.11.201.18)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = dedicated)

      (SERVICE_NAME = ORADB)

    )

  )

I have also set my TNS_ADMIN variable in System Variable. TNS_ADMIN = F:\app\Ashraful\product\11.2.0\dbhome_1\NETWORK\ADMIN

Listener is up and ok.

I can successfully connect:

SQL> conn hr/****

Connected.

but can't do this :

SQL> conn hr/****@ORADB_18

ERROR:

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

This post has been answered by RNi on May 26 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2015
Added on May 26 2015
4 comments
2,423 views