Thanks to Lisa and others who replied.
I cannot use EXECUTE IMMEDIATE as my Oracle version is 7.2.2.That is the
reason I am using DBMS_SQL.
At the beginning, I used DBMS_SQL.EXECUTE(CUR1), it gave errors, hence I
dropped.
Now I have used it again after your suggestion and noticed the error
clearly.
The problem is ,I am using the DBMS_SQL.EXECUTE as Procedure, but it is a
function.
I have used it as function and got it working.
I should blame myself because I didn't notice the error messages properly.
regards,
Suren
Oracle DBA
Sony
-----Original Message-----
Sent: Monday, June 11, 2001 5:02 PM
To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Surendra, you need to execute it. Look at the spec of dbms_sql (I want to
say it's dbms_sql.execute()). Either that or use EXECUTE IMMEDIATE.
Lisa Koivu
Oracle Database Administrator
954-935-4117
The information in the electronic mail message is Cendant confidential and
may be legally privileged, it is intended solely for the addressee(s) access
to this internet electronic mail message by anyone else is unauthorized. If
you are not the intended recipient, any disclosure, copying, distribution or
any action taken or omitted to be taken in reliance on it is prohibited and
may be unlawful.
The sender believes that this E-mail and any attachments were free of any
virus, worm, Trojan horse, and/or malicious code when sent. This message and
its attachments could have been infected during transmission. By reading the
message and opening any attachments, the recipient accepts full
responsibility for taking protective and remedial action about viruses and
other defects. Cendant Corporation or Affiliates are not liable for any loss
or damage arising in any way from this message or its attachments.
-----Original Message-----
Sent: Monday, June 11, 2001 4:55 PM
To: Multiple recipients of list ORACLE-L
Hi List,
As the part of developing hot backup strategy, I am testing the
following
piece of code
to take care of arch files to be made avaialable along with backup set.
=====================
SQL> create or replace procedure log_switch as
2 cursor1 integer;
3 begin
4 cur1 := dbms_sql.open_cursor;
5 dbms_sql.parse(cur1,'ALTER SYSTEM SWITCH LOGFILE', dbms_sql.v7);
6 dbms_sql.close_cursor(cur1);
7 end;
8 /
Procedure created.
SQL> execute log_switch;
PL/SQL procedure successfully completed.
======================
But, I have observed several times that the above code is not
forcing a log
switch.
FYI, I want to track the sequence# of logfiles before and after the hot
backup, so that
I can backup the files in that range.
Am I properly using the DBMS_SQL?
Any help is highly appreciated
TIA,
Suren
Oracle DBA
Sony
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
<http://www.orafaq.com>
--
Author: Tirumala, Surendra
INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Tirumala, Surendra
INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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).