Issue is with ojdbc jar.....Please put the ojdbc5.jar in classpath and try.
Oracle 9i does not add as sysdba in JDBC connection String?
Question
I am trying to connect oracle9i using jdbc (ojdbc5.jar and ojdbc6.jar)
. But jdbc connection string is not appending as sysdba at the end of connection string.
But when i do same thing using oracle10/11, It works fine.
This is connection string for 9i
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 172.168.1.123)(PORT = 1521)))(CONNECT_DATA = (SRVR=DEDICATED) (SID = abcd)))
Please help me to solve the issue.
Thanks, Anjali
La solution 2
Autres conseils
you can try this:
Properties props;
Connection connection;
props = new Properties();
props.put("user", xxxx);
props.put("password", "yyyy");
props.put("internal_logon", "sysdba");
props.put("v$session.osuser", System.getProperty("user.name").toString());
//if you are using service
connection = DriverManager.getConnection("jdbc:oracle:thin:@your_host:your_port/your_service, props);
//or if you are using sid
connection = DriverManager.getConnection("jdbc:oracle:thin:@your_host:your_port:your_service, props);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow