如何在Java中作为SYS连接到Oracle?
我收到此错误:
java.sql.SQLException: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
如何修复?(我需要是)。谢谢。SYS
我收到此错误:
java.sql.SQLException: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
如何修复?(我需要是)。谢谢。SYS
试试这个 :
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)
答案已经在那里,
您正在尝试连接,但服务器允许sys
也
sys as sysdba
或
sys as sysoper
只需将用户参数更改为上面的任一
user='sys as sysdba'
或
user='sys as sysoper'