Cannot Connect using JDBC Oracle Thin Client with "New Method" Using SID [message #577916] |
Thu, 21 February 2013 14:46 |
|
wmcrews
Messages: 6 Registered: February 2013
|
Junior Member |
|
|
I wonder if anyone can help out. The problem is that this connection errors when I try to connect using my SQuirreL client. My developers want to connecting using the SID or the SERVICE_NAME and by using the "New Method" syntax, not the "Old Method" syntax. According to the documentation the "New Method" syntax works with the SERVICE_NAME or the SID. The "Old Method" only works with the SID.
# Host name is vmwwin7634.na.SAS.com
# SID is sting2
# SERVICE_NAME is sting2.na.sas.com
PROBLEM using SID errors ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2
THIS WORKS using SERVICE_NAME ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com
I am using SQuirreL Client version 3.4.0
# Here is the tnsnames.ora entry on the server.
STING2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vmwwin7634.na.SAS.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sting2.na.sas.com)
)
)
# In this documentation it says, "On new syntax SERVICE may be a oracle service name or a SID."
You can find this on the orafax wiki under JDBC#Thin_driver.
# I was able to connect with the "old method" using the SID only, SERVICE_NAME errors
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2.na.sas.com
(SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.")
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2 (this works)
# "New Method"
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com (this works)
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2 (this errors)
(SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.")
|
|
|
|
|
|
|
Re: Cannot Connect using JDBC Oracle Thin Client with "New Method" Using SID [message #577923 is a reply to message #577921] |
Thu, 21 February 2013 16:07 |
|
wmcrews
Messages: 6 Registered: February 2013
|
Junior Member |
|
|
C:\oracle\product\11.2.0\dbhome_1\BIN>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 21-FEB-2013 17:05
:31
Copyright (c) 1991, 2010, 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.1.0 - Produ
ction
Start Date 08-FEB-2013 21:55:23
Uptime 12 days 19 hr. 10 min. 9 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\oracle\product\11.2.0\dbhome_1\network\admin\listen
er.ora
Listener Log File c:\oracle\diag\tnslsnr\vmwwin7634\listener\alert\log.x
ml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vmwwin7634.na.SAS.com)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "sting2.na.sas.com" has 1 instance(s).
Instance "sting2", status READY, has 1 handler(s) for this service...
Service "sting2XDB.na.sas.com" has 1 instance(s).
Instance "sting2", status READY, has 1 handler(s) for this service...
Service "stingray.na.SAS.com" has 1 instance(s).
Instance "stingray", status READY, has 1 handler(s) for this service...
Service "stingrayXDB.na.SAS.com" has 1 instance(s).
Instance "stingray", status READY, has 1 handler(s) for this service...
The command completed successfully
C:\oracle\product\11.2.0\dbhome_1\BIN>lsnrctl service
LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 21-FEB-2013 17:05
:48
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "sting2.na.sas.com" has 1 instance(s).
Instance "sting2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:13309 refused:0 state:ready
LOCAL SERVER
Service "sting2XDB.na.sas.com" has 1 instance(s).
Instance "sting2", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: VMWWIN7634, pid: 1332>
(ADDRESS=(PROTOCOL=tcp)(HOST=vmwwin7634.na.SAS.com)(PORT=64530))
Service "stingray.na.SAS.com" has 1 instance(s).
Instance "stingray", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:16052 refused:0 state:ready
LOCAL SERVER
Service "stingrayXDB.na.SAS.com" has 1 instance(s).
Instance "stingray", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: VMWWIN7634, pid: 2988>
(ADDRESS=(PROTOCOL=tcp)(HOST=vmwwin7634.na.SAS.com)(PORT=63922))
The command completed successfully
|
|
|
|
|
|
|
|