PL/SQL help ...

PL/SQL help ...

 

  

Hi All,

How do I run the following command in PL/SQL procedure.

ALTER SYSTEM SWITCH LOGFILE

If I use implicit cursor as

strSQL1 := 'ALTER SYSTEM SWITCH LOGFILE';
BEGIN
cur_IMPLICIT := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cur_IMPLICIT, strSQL1, DBMS_SQL.NATIVE);
SEL_Count_Aft := DBMS_SQL.EXECUTE(cur_IMPLICIT);
DBMS_SQL.close_cursor(cur_IMPLICIT);
END;

I got the following error.

ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1120
ORA-06512: at "SYS.DBMS_SQL", line 323
ORA-06512: at "PTEST.TEST_P_DEL_PER", line 47
ORA-06512: at line 7

I could able to run the same command from the same user PTEST with out any issues.

Can some body tell how to rectify this?

Thanks in advance.

Regs,
Sree












DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.

Oracle LazyDBA home page