Further to the earlier post today regarding setting up client access to a 10g database via CMAN - which I have now resolved thanks to aussie_dba - I now have another hurdele to overcome, which I hope is simply due to my unfamiliarity with oracle networking.
The client PC has a tnsnames.ora containing a number of connections to the various databases on the server, which are of the form
<db> =
(DESCRIPTION =
(SOURCE_ROUTE=yes)
(ADDRESS = (PROTOCOL = TCP)(HOST = <server>)(PORT = 1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = <server>)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = <dbname>)
)
)
which all work fine for ODBC or SQL Plus.
I am now trying to connect to one of the databases via an application's API which uses JDBC to connect, and I cannot get it to work. Investigating the structure of the connection string it appears by default to want something of the form
jdbc:oracle:thin@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.xxx
.xxx.xxx)(PORT=xxxx)))(CONNECT_DATA=(SID=xxxxx)))
which is the "normal" structure of a tns connection entry. If I try simply replacing the (DESCRIPTION ...) section with the one from my tnsnames.ora I get a Java error saying the string is malformed.
Has anybody experienced this before, and if so, how did they work around it? Is it possible to define a local service on the client that I can connect to in the normal fashion, which then routes everything off to the remote server via connection manager?
regards
Richard
