Connecting to Oracle using UCP and DataDirect driver

578 views Asked by At

I am trying to connect to a Oracle database using UCP with DataDirect JDBC driver for oracle. What is the URL tha tI need to use. I am currently using the following.

<property name="URL" value="jdbc:datadirect:oracle:TNSNamesFile=C:\\Oracle\\11.2.0\\client_1_X64\\network\\admin\\tnsnames.ora;TNSServerName=TESTA"/>

I get the error Caused by: java.sql.SQLException: [DataDirect][Oracle JDBC Driver]A host name must be specified if a port number is specified.

Why do I get this error? Is it possible to use UCP with DataDirect JDBC driver?

1

There are 1 answers

0
Aaron Sahm On

It appears your URL is correct, here is the sample URL from the documentation:

jdbc:datadirect:oracle:TNSNamesFile=c:\\oracle\\NETWORK\\ADMIN\\tnsnames.ora;
    TNSServerName=FITZGERALD.SALES

You can go here for more information on connecting to Oracle database using UCP with DataDirect JDBC :

http://media.datadirect.com/download/docs/jdbc/alljdbc/userguide/jdbcoracle.11.08.html#974893

One thing you might try is using a hostname and port number, here's a sample URL:

jdbc:datadirect:oracle://server3:1521;ServiceName=ORCL;User=test;
Password=secret