Is connect as SYSDBA supported in direct mode?

Is connect as SYSDBA supported in direct mode?

Postby tomharris » Wed 23 Nov 2011 12:33

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
tomharris
 
Posts: 18
Joined: Tue 27 Jul 2010 12:22

Postby Pinturiccio » Thu 24 Nov 2011 11:54

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
Pinturiccio
Devart Team
 
Posts: 1849
Joined: Wed 02 Nov 2011 09:44

Postby tomharris » Fri 25 Nov 2011 18:01

Thanks for your help. We got this sorted now
tomharris
 
Posts: 18
Joined: Tue 27 Jul 2010 12:22


Return to dotConnect for Oracle