Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: sqlplus question

Re: sqlplus question

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Tue, 29 Jan 2002 01:42:57 -0800
Message-ID: <F001.003FE56E.20020129013545@fatcity.com>

Rajesh Dayal wrote:
>
> I was also trying to put some script on Oracle scheduler and successful too.
> But on Oracle 8
> I failed. It was successful on Oracle 8i (8 doesn't support execute
> immediate). Would appreciate,
> if someone can give equivalent code for Oracle 8.
> Here is the code for Oracle 8i,
>
> create or replace PROCEDURE SWITCH IS
> 2 BEGIN
> 3 execute immediate 'alter system switch logfile ';
> 4 commit ;
> 5 END;
> 6 /
>
> Thanks in Advance,
> Rajesh
> NOTE: It would be executed with any user having sysdba privilege.
>

Look in the doc for the dbms_sql package. Hardly more complicated than 'execute immediate' for DDL (you declare a handler for the cursor, then it's done in two calls, parse and execute).

-- 
Regards,

Stephane Faroult
Oriole Ltd
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Jan 29 2002 - 03:42:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US