Skip to content

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.


try this :

import java.sql as jsql
import java.lang as lang
driver, url, user, passwd = (
"sys as sysdba",
 c = jsql.DriverManager.getConnection(url,user,passwd)