Re: SQL*DBA Commands in OCI

From: Tim Smith <tssmith_at_netcom.com>
Date: 1995/04/05
Message-ID: <tssmithD6KBK5.Ewo_at_netcom.com>#1/1


Rajamohan Gandhasri <rgandhasri_at_wpo.borland.com> writes:
>> Rajamohan Gandhasri <rgandhasri_at_wpo.borland.com> writes:
>> >I am wondering if we can use OCI in C for SQL*DBA Commands.
>> >Any help appreciated.
>>
>> Not sure what you mean by this. You can emulate any special SQL*DBA
>> (as opposed to SQL) command using the OCI. In fact, you can do
>> anything that can be done with Oracle using the OCI, it's just a small
>> matter of programming. But you cannot issue SQL*DBA commands like
>> VARIABLE or SET CHARWIDTH in the OCI (no need to).
 

>Thanks for responding.
 

>I meant executing commands like,
 

> CONNECT,
> CREATE USER,
> GRANT SELECT, UPDATE, DBA privileges.
> CREATE ROLE etc.
 

>via OCI in C. Is it possible ?

You can connect, and execute DDL commands using the OCI. What you cannot do (that I neglected to mention) is things like starting up and shutting down the database. These you must use SQL*DBA (or its replacement: Server Manager) to do.

In general, if it's SQL, you can do it using the OCI. For many special commands (like SPOOL, etc.), you could probably mimic their actions by C programming with the OCI. But the core-level non-SQL commands like STARTUP and SHUTDOWN are done using SQL*DBA. There might be a way to do these programmatically (I honestly don't know), but it probably would not be a good idea. Received on Wed Apr 05 1995 - 00:00:00 CEST

Original text of this message