OS authentication in Oracle 10g via jdbc:oracle:oci

I'm very much a newbie to Java / JDBC and I am trying, but failing, to connect with the database using OS authentication via jdbc, and hoping someone may help.
My questions are:
1. Is OS authentication supported for jdbc:oracle:oci with Oracle 10g ? I couldn't find a general statement of whether it works or not.
(NB.The only information I managed to find, on another forum, is that it should be supported but there is a bug and so it does not work, but the author did not post all of his/her platform details, so the bug may only affect his/her situation. )
2. If it is supported and works, could some one suggest what is wrong with my syntax . I could not find an example in any Oracle 10g/JDBC documentation.
The details are as follows: -
Database : - Oracle 10g Enterprise Edition 10.2.0.2.0 running on Solaris.
Development platform : - NetBeans 6.1, JDK 1.6.
Runtime environment: - JRE1.6 on Windows XP professional.
OPS$ authentication : - the OPS$ accounts have been set-up and we use these successfully for PL/SQL and SQL Plus access.
JDBC : - I can connect to the database with both jdbc:oracle:thin ( linking in ojdbc14.jar) and jdbc:oracle:oci by using username and password, so I know my JDBC library linkage is OK, eg. this works fine :
final String url = new String("jdbc:oracle:oci:" + uname + "/" + pword + "@" + environment);
where environment is the SID
I have trawled the Oracle documentation which tells me that OS authentication is not supported for Oracle 10g for the jdbc:oracle:thin driver, so I have tried to connect with jdbc:oracle:oci driver using the following code :
final String url = new String("jdbc:oracle:oci:/@" + environment);
final Driver driver = new oracle.jdbc.OracleDriver();
DriverManager.registerDriver(driver);
final Properties props = new Properties();
conn = DriverManager.getConnection(url);
but this gives the following error :
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
Other info: - The tnsnames.ora file contains nothing but there are entries in the ldap.ora and sqlnet.ora files.
My questions are:
1. Is OS authentication supported for jdbc:oracle:oci with Oracle 10g ? I couldn't find a general statement of whether it works or not.
(NB.The only information I managed to find, on another forum, is that it should be supported but there is a bug and so it does not work, but the author did not post all of his/her platform details, so the bug may only affect his/her situation. )
2. If it is supported and works, could some one suggest what is wrong with my syntax . I could not find an example in any Oracle 10g/JDBC documentation.

If you specify the SID/service_name in the url, you are attempting to connect via SQL*NET and REMOTE_OS_AUTHENT must be set to true in the database. If you are connecting from the same host the database runs on, then just leave the SID off and make sure the ORACLE_SID environment variable is set.
You can reproduce the same error you get in java with
sqlplus /@SID
SQL*Plus: Release 10.2.0.2.0 - Production on Fri Nov 7 12:14:08 2008
Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
ERROR:
ORA-01017: invalid username/password; logon deniedSample Code:
import oracle.jdbc.pool.OracleDataSource;
import java.sql.Connection;
import java.sql.SQLException;
public class conn {
  public static void main(String[] args) throws SQLException {
    OracleDataSource ods = new OracleDataSource();
    ods.setURL("jdbc:oracle:oci:/@");
    Connection conn = ods.getConnection();
    conn.close();
}

Similar Messages

  • Where can I find platform support metrix for Oracle 10g/11i JDBC drivers?

    I need find the official supported platform metrix of Oracle 10g/11i JDBC drivers.
    Where can I find this kind of information?
    especially, does Oracle 10g/11i JDBC drivers support Windows2008 and AIX6.1?
    Any information, please share with me here.
    Thank you so much!

    This Metalink has all the nesscessary inforamtion
    metalink 401934.1
    Besides this you can check the JDBC developers guide
    [For 11|http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/overvw.htm#i1003779] [For 10g|http://download.oracle.com/docs/cd/B14117_01/java.101/b10979/overvw.htm#sthref61]

  • Porting from Oracle 10g AS to Oracle 11g Weblogic server

    Hi,
    I am trying to port J2EE applicatin from Oracle 10g AS to Oracle 11g Weblogic Server. I have jsp files which contains sql code embedded to fetch data from the DB. The components used in this application are Java, JSP, Servlets and Stateless session beans.
    I have a commonjar which is used to create DB Connection manager and other common stuff which is present inside web-inf/lib. My application is packaged as an ear and which contains the war and different ejb-project.jar files. When the Stateless bean is trying to call the ConnectionManager class, which is present inside the commonjar inside web-inf/lib, I get InvocationTargetException. When I debugged in Eclipse, I see that that inside ejb the reference ConnectionManager, the variable cannot be resolved. So I guess at runtime, ejb is not able to locate ConnectionManager Class.
    I tried to copy this jar to APP-INF/lib and the same jar is present inside web-inf/lib as well. In that case what happens is the jsp fails with the exception ConnectionManager cannot be resolved.
    How can I make the ejb work by keeping the commonjar inside web-inf/lib alone.
    Any help or suggestions?
    Thanks
    Raj

    The classloader hierarchy in WLS looks like this (arrows denote inheritance direction):
    Java bootstrap classloader <- Java CLASSPATH classloader <- WLS $DOMAIN_HOME/lib classloader <- Application (e.g., EAR) classloader <- web app classloader <- single JSP classloader
    The Connection Manager is loaded by the web app classloader while the EJBs are loaded by the application classloader so the EJBs have no visibility to the classes loaded by the child (web app) classloader.
    The simplest fix might be to move the Connection Manager jar file to the EAR file's APP-INF/lib directory.
    One word of caution though, you need to be using WebLogic Server's Data Sources and JDBC connection pooling to make sure that you correct transactional behavior if the application is doing any sort of JTA transaction (regardless of whether the JTA transactions are using XA or not...).
    Hope this helps,
    Robert

  • Connect Oracle 10G XE and Oracle 9.2i Simultaneously from same machine

    Hello,
    How to Connect Oracle 10G XE and Oracle 9.2i Simultaneously from same machine using .Net Application.
    I have one application which is in .net, i want to connect it with oracle 10g XE and oracle 9.2i Simultaneously.
    it always connect only one database which is first in environment variable (path).
    please reply.

    Use SQL*Net or JDBC Connections. Looks like you are connecting using the Bequeathed connections
    Christopher Soza
    Oracle BI DBA

  • Oracle 10g R2 vs Oracle 10g;;;Plz Help Me

    Hi all;
    I'm preparing my first OCA exam ; Oracle Database 10g: Administration I. I 'm doing my preparation basically from 2 books ; Sybex Book OCA-Exam and All-in-One Exam Guide book.
    Both books 're based on the first release of Oracle 10g.
    My questions 're :
    - What's the diffrence between Oracle 10g R2 vs Oracle 10g R1?
    - What's New in Oracle 10g R2 (parameters, default parameters values, features...)?
    thanks a lot,
    Best REgards,
    W
    Edited by: OracleJavaLinux on Oct 30, 2008 8:01 AM

    Well satish has given link for the difference in both the versions. I shall add to this that at this moment of writing,there is not anything which makes the exams depend on the release 2.The sybex books would be good enough but I shall recommend to attend Oracle Univ training for the same.
    You can go ahead with the exam by preparing from these books, no issues would be there.
    HTH
    Aman....

  • Connect Oracle 10g Developer with Oracle 8i database

    Is it possible to connect Oracle 10g Developer with Oracle 8i database. If possible then plz guide how i can.

    with Oracle Developer 10g 9.0.4 is no problem to connect to Oracle 8i.
    with Oracle Developer 10g 10.1.2. you need the Patch 8.1.7.4 for 8i, i think.

  • How we import oracle 10g dump to oracle 9i

    Hi
    Expert I want to import oracle 10g dump to oracle 9i
    is it possible ??????????
    but how
    Thanks
    Madhvesh

    Welcome to the forums !
    Pl post details of your OS and database versions.
    Pl see MOS Doc 1065604.1 (How to Import to lower version database or run network export with exp/imp utilities)
    HTH
    Srini

  • Deployment of Oracle 10g Application on oracle 10g application server

    Sir,
    I am new in this forum. Please guide me how to deploy oracle 10g application on oracle 10g application server.

    Dear Ghulam,
    1)Create A new OC4j instance on Oracle 10g Application Server
    2)Deploy ur war or ear file accordingly on this OC4J.
    3)Create the datasource ie connection of application with the database
    4)Tune your Java Parameters inside the OC4J for better performance.
    The details of this is explained on the above post ie two link.
    Regards
    Fabian

  • Convert Window Oracle 10g to Linux Oracle 11g

    HI Experts
    My current version is Oracle 10g on Window and i want to convert on Oracle 11g on Linux.
    What will be the best way to convert it ? can possible to direct convert
    or i need to be database migration from window Oracle 10g to Linux Oracle 10g and then covert from Linux Oracle 10g to Linux Oracle 11g.
    If the direct conversion is possible then please let me know the way or if u have document then please share it.
    I searched lot but i didn't get anything.....
    Thanks in advance

    What is the expected downtime duration ?
    What is the database size ?
    For a "small" database with no downtime constraint you could use Data Pump to move data.
    For a "large" database with minimum downtime you could use Oracle Streams (with Enterprise Edition) or Golden Gate (separate product: needs new licensing).
    You can find detailed migration/upgrade recommendations and scenarios on OTN database upgrade page:
    http://www.oracle.com/technetwork/products/upgrade/index.html
    Edited by: P. Forstmann on 22 mars 2013 13:03

  • ERROR while connecting to Netezza Database from oracle 10g via dblink.

    Gurus,
    We are trying to connect to Netezza DB from oracle 10g DB.. We successfully establised ODBC connection but unable to retrieve data over the dblink connected from oracle to Netezza. We get this error.. Please HELP ASAP!!!!!!!!
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    Server and/or port attributes are empty {HY000,NativeErr = 33}

    Manik wrote:
    We are trying to connect to Netezza DB from oracle 10g DB.. We successfully establised ODBC connection but unable to retrieve data over the dblink connected from oracle to Netezza. We get this error.. Please HELP ASAP!!!!!!!!
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    Server and/or port attributes are empty {HY000,NativeErr = 33}Always test ODBC client connectivity on the Oracle server to the remote and foreign database, first. Use the isql ODBC client command line interface (as the oracle or grid o/s user).
    If this does not work, then Oracle HSO will also not work.
    Once you have confirmed that this is working, then configure the HSO service for Oracle.
    If that fails, enables ODBC client tracing for that HSO service (in the init file for that service) to see exactly what ODBC calls Oracle is making and which of these are failing.

  • Need help regarding upgrading Oracle 10g Forms to Oracle 11g Fusion Middlew

    Hi All,
    I am trying to create a workshop on a VM for showing the migration / upgrading of Oracle Forms 10g to Oracle 11g FMW using the Upgrade Assistant tool available in <ORACLE_HOME>/bin/ua.bat.
    As per my understanding of pre-requisites:
    1)     I need to install Oracle SOA Suite 10g on my VM.
    2)     I also need to install Oracle SOA Suite 11g on my VM.
    3)     I need to install Oracle Forms/Reports Services 10g on my Oracle SOA Suite 10g installation.
    4)     I need to run Oracle Forms/reports installer on my Oracle SOA Suite 11g installation.
    5)     I need to run upgrade assistant tool on my VM to upgrade my form from source(Oracle SOA Suite 10g) to destination(Oracle SOA Suite 11g). Is it mandatory for this migration that I should have Oracle SOA Suite 10g and Oracle SOA Suite 11g on the same system ?
    Having all these software installed on one VM would be difficult. So just wanted to check can I avoid any software to install on VM ?
    If there is any alternative suggestion then please let me know.
    Regards,

    What do you want to do with the SOA-suite? At least for Froms10G is is not necessary.

  • Can not configure Oracle 10g form  on oracle 11g client

    Hi
    I need to install oracle 10g form in my system .
    Here is my system
    1. OS --XP
    2. 32 Bit
    4. Already oracle 11g release client installed ( I think that create the problem )
    I tried to install oracle 10g form , it installed but can cont configure net manager for it , Always it point to 11g client and hence I could not configure .
    Also I tried install Oracle Forms first then 11g client , But  I got same issue .
    I think if  I created multiplr home one for 11g client and other for forms , it may work out .
    Please  help me
    Debashis

    While deploying the example 'VacationRequest' in the oracle complete guide for 11g, i got an exception like this
    "12:08:15 PM] Deploying Application...
    [12:11:16 PM] [Deployer:149191]Operation 'deploy' on application 'VacationRequestTaskFlow' is initializing on 'soa_server1'
    [12:11:24 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application VacationRequestTaskFlow on soa_server1.: [Deployer:149145]Unable to contact 'bam_server1'. Deployment is deferred until 'bam_server1' becomes available.; nested exception is:
         java.rmi.UnknownHostException: Could not discover administration URL for server 'bam_server1'.
    [12:11:24 PM] [Deployer:149193]Operation 'deploy' on application 'VacationRequestTaskFlow' has failed on 'soa_server1'
    [12:11:24 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application VacationRequestTaskFlow on soa_server1.: Failed to load webapp: 'VacationRequestTaskFlow.war'.
    [12:11:24 PM] Weblogic Server Exception: weblogic.application.ModuleException: Failed to load webapp: 'VacationRequestTaskFlow.war'
    [12:11:24 PM] Caused by: java.lang.ClassNotFoundException: oracle.adf.library.webapp.ResourceServlet
    [12:11:24 PM] See server logs or server console for more details.
    [12:11:24 PM] weblogic.application.ModuleException: Failed to load webapp: 'VacationRequestTaskFlow.war'
    [12:11:24 PM] #### Deployment incomplete. ####
    [12:11:24 PM] Deployment Failed"
    Can anyone help in this.

  • Oracle 10g XE and Oracle 8.1

    HI,
    I am new in oracle and I installed both Oracle 10g XE and after Oracle 8.17 Standard with Apache server. Does anybody know why Oracle 10g XE doesn't start (doesn't find APEX) when Oracle 8.17 is running on the same computer?
    Tks,
    Laurentiu

    You can not use XE parallel with another Oracle instance. Only one instance per network.
    Cheers!

  • Create MVs in Oracle 10g DB from Oracle 9i DB using DB link

    The tables of an Oracle 10g database is formed mainly (about 90%) from materialized views. These views are created using a database link extracting the data from an existing Oracle 9i database (10g connecting to 9i).
    The MVs created from simple queries does not take much time, but whenever a query contains "joins", time freezes and after four hours no results are registered independently of the database volume or number of transactions.
    But in case the MVs are created in an Oracle 9i database (9i connecting to 9i), the full creation time varies from four minutes to twenty minutes (about 1,200,000 transactions).
    All possible scenarios related to hardware and networking were tested and excluded.
    The resolution of this issue is very urgent because it is preventing our institution from upgrading to Oracle 10g.

    Why post this one into the OTN Feedback Forum rather than a more appropriate like General Database Discussions ?<br>
    <br>
    Nicolas.

  • Oracle 10g installing on Oracle EL, getting ORA-12157 error?

    My boss is getting really impatient. I have tried installing Oracle 10g on... Oracle EL, CentOS 4, Fedora 4, Fedora 5, and I get the same error on them alll...
    ORA-12157: TNS: internal network communication error
    This occurs during the end phase of the installation, when it says "Clone database creation". Network seems to be working, can ping the server, static IP, all that?
    Any help appreciated, I've been working on this for 5 days.
    Jon

    Verbatim, this error means:
    ORA-12157:     TNS:internal network communication error
    Cause:     Internal error during network communication.
    Action:     Not normally visible to the user. For further details, turn on tracing and reexecute the operation. If error persists, contact Worldwide Customer Support.Have you met all requirements before proceeding with installation? Do you have all required patches? Is there any warnng during the prerrequisites verifying routine? Is there any outstanding issue recorded on your install log file?
    I suggest you, after verifying above points, to go ahead wiht a software only installation, next, using the network and databse assistants perform a network configuration and a database creation, this way you'll be able to isolate the source of the problem and go ahead with a specific troubleshootig.

Maybe you are looking for

  • An exception was caught while scheduling the publication. (FBE60203)

    Hi All, Iam getting below error when  am using publication to send doc to personal email. Please advice me to find out the solution, thanks in adavance... Error Message: ERROR [PublishingService:HandlerPool-124] BusinessObjects_PublicationAdminLog_In

  • I can't pair my iphone4 to my ipad2, they can't find one another!

    I'm hoping I've overlook something obvious but they just won't connect, the iPad finds the iPhone but not vice versa. Any help?

  • How to use retentions policies in OWA

    Please don't use acronyms without defining them first I am trying to setup retention policies for my boss's email. He uses Outlook 2013 on his laptop. Am I correct in thinking that if I set up retention policies through his microsoft 365 Outlook Web

  • Error OUI-25031 - default installation

    All day Im trying to install Oracle 10g Release 2 (10.2) for Solaris 10 (x86). Each time it finishes with error: OUI-25031. Its going to be just a default installation. I did it many times ago but never had this problem. The log file is telling nothi

  • ASA and plusnet fibre

    Hi, One of our sites has just upgraded to fibre broadband, the fibre box provided is a BTopenreach. I have configured an ASA 5505 with a Zyxel NBG5615 router. I have tested the router without the ASA which traffic works but when i add the ASA traffic