Solve problem 'connection as SYS should be as SYSDBA or SYSOPER'

Viewed 8078

I try to connect to oracle sys user by c# code and give me this error

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

my connection code

 OracleConnection financonn3 = new OracleConnection(connectionString: @"DATA SOURCE=10.10.10.150/bills;PASSWORD=xxxxxxx;USER ID=sys;");

what the way to solve this problem

1 Answers

The error caused because you want to use sys user but didn't set DBA Privilege=SYSDBA in your connection string.

default DBA Privilege will be a normal user.

OracleConnection financonn3 = new OracleConnection(connectionString: @"DATA SOURCE=10.10.10.150/bills;DBA Privilege=SYSDBA;PASSWORD=xxxxxxx;USER ID=sys;");

Note

I would suggest you use other create user instead of sys to be your using user. because sys is a very important role in oracle like an administration.

Related