Page 1 of 1

Is connect as SYSDBA supported in direct mode?

Posted: Wed 23 Nov 2011 12:33
by tomharris
Hi there,

we are having problems with this. Is this supported in direct mode? We are getting an error ORA-28009: connection as SYS should be as SYSDBA or SYSOPER.

Any clues?

Kind regards, Tom

Posted: Thu 24 Nov 2011 11:54
by Pinturiccio
If you want to connect to a server with User Id=sys, then you have to add the connect mode to your connection string.

Code: Select all

OracleConnection conn = new OracleConnection();
conn.ConnectionString += "Connect Mode=SysDba;";
OR

Code: Select all

OracleConnection conn = new OracleConnection();
conn.ConnectMode = OracleConnectMode.SysDba;
The enum OracleConnectMode has the following members:
Default
SysAsm
SysOper
SysDba

Posted: Fri 25 Nov 2011 18:01
by tomharris
Thanks for your help. We got this sorted now