View Single Post

   
  #7 (permalink)  
Old 02-25-2008, 05:20 AM
Peter Sylvester
 
Posts: n/a
Default Re: JDBC Connection problem ORA-12505 SID does not exist

brent wrote:
> Here's the tnsnames.ora entry.
>
> H8SONTST =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ENABLE = broken)
> (FAILOVER = on)
> (LOAD_BALANCE = on)
> (ADDRESS = (PROTOCOL = TCP)(HOST = host 1)(PORT = 1521))
> (ADDRESS = (PROTOCOL = TCP)(HOST = host 2)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVER = DEDICATED)
> (SERVICE_NAME = h8sontst)
> (SID = h8sontst)
> (FAILOVER_MODE =
> (TYPE = select)
> (METHOD = basic)
> (RETRIES = 180)
> (DELAY = 5)
> )
> )
> )
>


Try removing the SERVICE_NAME from the TNS entries and see if you can
still connect via sqlplus. (You might also need to drop the failover
stuff). JDBC only uses the SID to connect, while sql*plus can use
either. Its possible that the SID is not the same as the service_name. I
am going to assume that "host 1" and "host 2" don't have spaces in the
name on the real file...

--Peter
Reply With Quote