Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-15-2003, 05:31 AM
Eneko Alonso Eneko Alonso is offline
Senior Member
 
Join Date: Mar 2001
Posts: 167
Default Oracle DBA

Hi,

I need to connect to Oracle from Delphi. But I need to connect 'as sysdba'.

How can I do it???

I want to be able to execute 'ALTER' sentences. Now I can do it only usign SQL scripts and sqlplus.

Is it possible?? Could I connect as sysdba??

Thanks for advanced!

<cb>SehnOken</cb>
Delphi Forever!!!
Reply With Quote
  #2  
Old 01-16-2003, 12:45 AM
nemo nemo is offline
Senior Member
 
Join Date: Mar 2001
Posts: 106
Default RE: Oracle DBA

The ODAC (Oracle Direct Access) components supports connecting as sysdba, setting the ConnectMode to cmSysDba.
In this component pack there are more components to execute SQL statements.
Reply With Quote
  #3  
Old 01-16-2003, 01:03 AM
Eneko Alonso Eneko Alonso is offline
Senior Member
 
Join Date: Mar 2001
Posts: 167
Default RE: Oracle DBA

Ok! Sounzs great, but I dont have money to buy it. I need to do it free.

Anybody has some code or free comps, plz???

Thanks for advanced!

<cb>SehnOken</cb>
Delphi Forever!!!
Reply With Quote
  #4  
Old 01-16-2003, 05:38 AM
nemo nemo is offline
Senior Member
 
Join Date: Mar 2001
Posts: 106
Default RE: Oracle DBA

To execute ALTER statements you mustn't to connect to Oracle Database as sysdba... Connect with a power user (sys, system, etc...) or with a user who have the necessary system and/or object privileges.
Reply With Quote
  #5  
Old 01-16-2003, 06:46 AM
Eneko Alonso Eneko Alonso is offline
Senior Member
 
Join Date: Mar 2001
Posts: 167
Default RE: Oracle DBA

Ok, it works with almost all ALTER querys.
But I wanna alter database status (CLOSE,OPEN,SHUTDOWN...)

I need to connect to a Standby Database too. This is only possible if you connect as sysdba.

How can I do it???

Thanks for your help!

<cb>SehnOken</cb>
Delphi Forever!!!
Reply With Quote
  #6  
Old 01-17-2003, 04:06 AM
nemo nemo is offline
Senior Member
 
Join Date: Mar 2001
Posts: 106
Default RE: Oracle DBA

Try to use NCOCI freeware component.
You can download from http://www.da-soft.com
Reply With Quote
  #7  
Old 01-17-2003, 05:53 AM
Eneko Alonso Eneko Alonso is offline
Senior Member
 
Join Date: Mar 2001
Posts: 167
Default RE: Oracle DBA

Ok, thank you a lot!

But, do you know how can I intall NCOCI components on Delphi 7???

I'm trying to do it, but I get a lot of code errors.
I'm trying to patch the code, but its a hell!.

Thanks for advanced!

<cb>SehnOken</cb>
Delphi Forever!!!
Reply With Quote
  #8  
Old 01-20-2003, 01:09 AM
nemo nemo is offline
Senior Member
 
Join Date: Mar 2001
Posts: 106
Default RE: Oracle DBA

I found this information in NCOCI8 forum on http://www.da-soft.com/
:

If you add the text below to NCOciDef.inc NCOCI8 will compile on Delphi 7:
{$ifdef VER150} // Delphi 7
{$define OCI_D3}
{$define OCI_D35}
{$define OCI_D4}
{$define OCI_D5}
{$define OCI_D6}
{$define OCI_DELPHI}
{$endif}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:58 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.