Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: JDBC connection using externally identified user

Re: JDBC connection using externally identified user

From: Peter Hitchman <pjhoraclel_at_gmail.com>
Date: Fri, 26 Oct 2007 10:13:46 +0100
Message-ID: <5e317f310710260213w33de924dtb81f48d39524ee8d@mail.gmail.com>


Hi,
I hit the same issue and after I allowed the database to allow remote OS authentication this worked in 10.2.0.3:

class testcon{

    public static void main(String args[]) throws SQLException {

        OracleDataSource ods = new OracleDataSource();
        String url = "jdbc:oracle:oci:@<YOUR_SID>";
        ods.setURL(url);
        ods.setUser("");
        ods.setPassword("");

.
.
.}

Using the DriverManager it can look like this:

.
.

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn=DriverManager.getConnection("jdbc:oracle:oci:/@<YOUR_SID>");
.
.

Regards

Pete

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Oct 26 2007 - 04:13:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US