Solved

oracle jdbc driver remote access

Posted on 2013-05-16
5
645 Views
Last Modified: 2013-05-17
If the oracle database is sitting on server 1, and on server one, I can use curl to access oracle through the following.

"jdbc" : {
        "driver" : "oracle.jdbc.driver.OracleDriver",
        "url" : "jdbc:oracle:oci:@xxxxx",
        "user" : "test",
        "password" : "test",
        "sql" : "select * from test_table"
    },

Open in new window


Is there anyway on server 2, which does not have Oracle installed, but can have the jdbc driver,  to access database that's sitting on server 1? If so, how?
0
Comment
Question by:xiaoyunwu
  • 3
  • 2
5 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 39172255
Use  the JDBC Thin connection.

Don't know Curl but here is a java example.  The connect string syntax is what you are after:

http://docs.oracle.com/cd/B28359_01/java.111/b31224/jdbcthin.htm

String connString="jdbc:oracle:thin:@prodHost:1521:ORCL";
0
 

Author Closing Comment

by:xiaoyunwu
ID: 39172559
Thank you!
0
 

Author Comment

by:xiaoyunwu
ID: 39174830
Now I got the following error:
while opening read connection: jdbc:oracle:thin:@ww.test.com:1521:xxx No suitable driver found,
Does this mean jdbc driver should be on the server 2, right?
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39174859
>>Does this mean jdbc driver should be on the server 2, right?

I'm not a Java person and have never heard of curl so I probably can't help much with the specifics.  If you Google around for "jdbc:oracle:thin" "No suitable driver found" there is a lot of information out there.

Everything points to the java class libs not being found.
0
 

Author Comment

by:xiaoyunwu
ID: 39174984
Thank you, slightwv.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question