java.sql.SQLException: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

Oracle  java.sql.SQLException: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

Class.forName("oracle.jdbc.driver.OracleDriver");
   // Driver oracle = new oracle.jdbc.driver.OracleDriver() ;
   String url = "jdbc:oracle:thin:@localhost:1521:XE";
   Connection c = DriverManager.getConnection(url, "sys as sysdba",
     "system");

将用户名的后面加上红色字体就行了

ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

你可能感兴趣的:(oracle,c,String,jdbc,url,System)