sql - Connect SYS DBA with no password using JAVA -


I want to connect the Oracle DB with Java, I have the code:

  class .forName ("oracle.jdbc.driver.OracleDriver"); dbURL = "jdbc: oracle: thin: @localhost: 1521: db"; con = DriverManager.getConnection (dbURL, "system as sysdba", ""); Return return;   

This is not working, but I tried a command prompt such as this Con / sysdba, it can be connected. I'm goggling about this article but not all codes work.

Anyone can help.

Thanks

JDBC to log on as a SYSDBA with thin driver You must configure the server to use the password file. So you need to provide the password for sys.

Comments

Popular posts from this blog

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

c++ - Redefined variable in the other module -