• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not able to connect to oracle using SID

 
Chinna Rao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I have a problem in connecting to oracle with my SID.


I am not able to connect to oracle using 1st approach. However, i am able to connect with 2nd approach.

1. C:\Users\username>sqlplus DB_USER/DBPassword@orcl

SQL*Plus: Release 11.2.0.3.0 Production on Sat Jul 13 15:11:07 2013

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

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


2. C:\Users\username>sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Sat Jul 13 15:15:28 2013

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

SQL> conn DB_USER/DBPassword;
Connected.
SQL>


Below are the details.

OS : Windows 7
Oracle:11.2.0.3.0
Server and Client both are on My local machine.

DBURL : jdbcracle:thin:@localhost:1521rcl
=====

tnsnames.ora
============
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)

Listener.ora
============
# listener.ora Network Configuration File: E:\app\username\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = E:\app\username\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\username\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = msi-l210)(PORT = 1521))
)
)

ADR_BASE_LISTENER = E:\app\username

SQLNET.ORA
==========
SQLNET.AUTHENTICATION_SERVICES= (NONE)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)


TNSPING OUTPUT
==============


C:\Users\username>tnsping orcl

TNS Ping Utility for 64-bit Windows: Version 11.2.0.3.0 - Production on 13-JUL-2013 14:37:05

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

Used parameter files:
E:\app\username\product\11.2.0\dbhome_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (0 msec)



Listener Status
===============
C:\Users\username>lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.3.0 - Production on 13-JUL-2013 15:09:24

Copyright (c) 1991, 2011, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.3.0 - Production
Start Date 13-JUL-2013 14:12:47
Uptime 0 days 0 hr. 56 min. 37 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File E:\app\username\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File E:\app\username\diag\tnslsnr\msi-l210\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=msi-l210.metricstream.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl.metricstream.com" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.metricstream.com" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic