How can i connect to oracle database as sysdba using bltoolkit?

佐手、 提交于 2019-12-12 03:16:41

问题


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;


回答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;";


来源:https://stackoverflow.com/questions/18570565/how-can-i-connect-to-oracle-database-as-sysdba-using-bltoolkit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!