Article View: borland.public.delphi.database.dotnet
Article #75How to connect to Oracle database as sysdba?
From: Ender
Date: Thu, 03 Nov 2005 07:37
Date: Thu, 03 Nov 2005 07:37
57 lines
2708 bytes
2708 bytes
Hi, all. I'm using OraConnection from System.Data.OracleClient. I'm readed MSDN documentation about how to make connection string to specify connection parameters, but how the hell i can connect with this as privileged user SYS? Usually when i connect as SYS to Oracle i need to write something: > sqlplus "sys@my_oracle_db as sysdba" I'm tried to pass: "Server=mica;Password=xxxxx;User ID=sys;Persist Security Info=true" Typical answer is: "System.Data.OracleClient.OracleException: ORA-28009: connection to sys should be as sysdba or sysoper". What i need to pass to OracleConnection.Create to connect as sysdba? P.S. Yes i really need to connect as sysdba and i know what i'm want to do. P.P.S. No i do not want to use BDP, it is too buggy and has too limited functionality for me. P.P.P.S. This is code which supposed to be work with connection... unit cDataCore; interface uses SysUtils, Classes, System.Data, System.Data.OracleClient; type TDataCore = class strict private FConnection: OracleConnection; strict protected procedure SetConnection(const Value: OracleConnection); public constructor Create(const ConnectionString:String); property Connection:OracleConnection read FConnection write SetConnection; end; implementation constructor TDataCore.Create(const ConnectionString:String); begin inherited Create; Connection:=OracleConnection.Create(ConnectionString); Connection.Open; end; procedure TDataCore.SetConnection(const Value: OracleConnection); begin if Value=FConnection then Exit; if FConnection<>NIL then FConnection.Free; FConnection := Value; end;
Technical Details
Message-ID:
<4369bcb3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 1effe6,3ac4827a84d68481,start X-Google-Attributes: gid1effe6,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Ender" <linuxmustdie@hotmail.com> Newsgroups: borland.public.delphi.database.dotnet Subject: How to connect to Oracle database as sysdba? Date: Thu, 3 Nov 2005 12:37:11 +0500 Lines: 58 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 62.148.235.94 Message-ID: <4369bcb3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1131003059 62.148.235.94 (2 Nov 2005 23:30:59 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail