Skip to content

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

When you‘re try to connect user with wrong tns alias name, it shows error

My tnsnames.ora

[oracle@cignadev ~]$ cat /u01/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

test =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.xx.xx)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = acedb)
)
)

[oracle@cignadev ~]$ tnsping test

TNS Ping Utility for Linux: Version 10.2.0.1.0 – Production on 22-JAN-2013 10:42:22

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

Used parameter files:
/u01/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.xx.xx)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = acedb)))
OK (10 msec)
[oracle@cignadev ~]$

my tns alias is “test” but If Itry to connect other names, I can face this error

[oracle@cignadev ~]$ sqlplus prem_saico_leb/prem_saico_leb@testme

SQL*Plus: Release 10.2.0.1.0 – Production on Tue Jan 22 10:43:50 2013

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

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

So connect with correct tns alias name.

[oracle@cignadev ~]$ sqlplus prem_saico_leb/prem_saico_leb@test

SQL*Plus: Release 10.2.0.1.0 – Production on Tue Jan 22 10:44:34 2013

Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>

About these ads
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 139 other followers

%d bloggers like this: