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

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

sql - PostgreSQL automatically update row at specific date -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -