0

I want to do oracle connection with C# but I want it without oracle client. Is that possible?

2 Answers 2

1

Yes. The oracle JDBC "THIN" client is a standalone pure java client so you don't need to install any native Oracle client (SQL*NET etc). Check http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html for Oracle 11, you want the ojdbc5.jar or ojdbc6.jar depending on if you're using Java5 or Java6.

If you are using another version of oracle, just google for instance "oracle 10g jdbc thin" for the Oracle 10 drivers (first hit when I search).

Sign up to request clarification or add additional context in comments.

1 Comment

If you want it in C#, why did you ask for JDBC and tag your question JAVA?
0

you need to have only the driver (jar). here is example:

Class.forName ("oracle.jdbc.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//myserver:PORT/SID", "USER", "PASS");
connection = DriverManager.getConnection(url, username, password);

2 Comments

Class.forName : which class? can you give some code sample ? thanks
how I can write my service_name instead of sid?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.