0

i can connect to oracle normal user successfully but when i try to connect sys user i got this error.

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

because i have to connect as sysdba but how can do it on bltoolkit ?

How can solve this problem ?

I have to connect as sys user to oracle using bltoolkit

My Connstring:

Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_‌​DATA=(SID=prod)));User Id=sys;Password=manager;DBA Privilege=SYSDBA;Data Source=oracle;

Mennan
  • 4,451
  • 13
  • 54
  • 86

1 Answers1

1

Oracle allows database administrators to connect to an Oracle Database with either SYSDBA or SYSOPER privileges. This is done through the DBA Privilege attribute of the ConnectionString.

//Connect SYS/SYS as SYSDBA   
con.ConnectionString = "User Id=SYS;Password=SYS;" + 
  "DBA Privilege=SYSDBA;Data Source=oracle;";
Rob van Laarhoven
  • 8,737
  • 2
  • 31
  • 49
  • I use bltoolkit3 for this project and i got error:Keyword not supported: 'dba privilege'... my connection string:Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=prod)));User Id=sys;Password=manager;DBA Privilege=SYSDBA;Data Source=oracle; – Mennan Sep 03 '13 at 10:39
  • The Oracle ManagedDataAccess driver will allow dba priviledge to function. Perhaps the driver you are using doesn't support that. I think I used the default .NET oracle driver and it didn't support DBA Privilege. – Jafin Mar 18 '14 at 00:49