The problem of connecting oracle data with sys account in jdbc mode

    Years later, when operating oracle, it was found that the jdbc connection could not be connected.

 

Java code  

jdbc.properties  

driver=oracle.jdbc.driver.OracleDriver  

url=jdbc:oracle:thin:@127.0.0.1:1521:orcl  

username=sys  

password=password  

 

Error: 

Java Code Favorite Code

Exception in thread "main" java.sql.SQLException: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER  

 

 

change to

Java Code Favorite Code

username=sys as sysdba  

(select as sysdba when the client tool connects)

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326245519&siteId=291194637