How to connect in java as SYS to Oracle?
问题 I receive this error: java.sql.SQLException: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER How to fix? (I need to be SYS ). Thanks. 回答1: try this : import java.sql as jsql import java.lang as lang driver, url, user, passwd = ( "oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@localhost:1234:xxx1", "sys as sysdba", "xxx1") lang.Class.forName(driver) c = jsql.DriverManager.getConnection(url,user,passwd) 回答2: Answers already there, you are trying to connect as sys but the