Database connection issue - ORA-12154
945471Jul 1 2012 — edited Jul 1 2012Hi ALL,
I can tnsping and sqlplus using SYSTEM from my client machine
Now i have created another user called DEVSS. I can connect to this user using SQL_developer but not via SQL plus.
Below I logged in using SYSTEM and then tried connecting using DEVSS, but it resulted in error
Please advise..Anypointers will be helpful!!
C:\Users\saring1>SQLPLUS SYSTEM/password@MYDATA
SQL*Plus: Release 11.2.0.3.0 Production on Sun Jul 1 20:48:36 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> connect DEVSS/password
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Warning: You are no longer connected to ORACLE.
SQL> connect DEVSS
Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
SQL>
If I try directly as well, i get an error as shown below -
M:\>sqlplus DEVSS/password@hostname
SQL*Plus: Release 11.2.0.3.0 Production on Sun Jul 1 21:44:10 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Enter user-name:
Enter user-name:
Below are the files (tnsnames and listner.ora) from the database server.
tnsnames.ora file on the client is similar.
Tnsnames.ora
**********************************************
MYDATA =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1251))
(CONNECT_DATA = (SERVICE_NAME = MYDATA)))
***********************************************
listner.ora
******************************************
#
# Net8 definition for Database listener
#
MYDATA =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1251))
)
)
SID_LIST_MYDATA =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /d01/product/11.2.0.3/mydata)
(SID_NAME = MYDATA)
)
)
STARTUP_WAIT_TIME_MYDATA = 0
CONNECT_TIMEOUT_MYDATA = 10
TRACE_LEVEL_MYDATA = OFF
LOG_DIRECTORY_MYDATA = /d01/product/11.2.0.3/mydata/network/admin
LOG_FILE_DEVRHYP = MYDATA
TRACE_DIRECTORY_MYDATA = /d01/product/11.2.0.3/mydata/network/admin
TRACE_FILE_DEVRHYP = MYDATA
ADMIN_RESTRICTIONS_MYDATA = ON
SUBSCRIBE_FOR_NODE_DOWN_EVENT_MYDATA = OFF
# added parameters for bug# 9286476
LOG_STATUS_MYDATA = ON
INBOUND_CONNECT_TIMEOUT_MYDATA = 60
# ADR is only applicable for 11gDB
DIAG_ADR_ENABLED_MYDATA = ON
ADR_BASE_MYDATA = /d01/product/11.2.0.3/mydata/admin/
************************************************