RE: PL/SQL help ...

RE: PL/SQL help ...

 

  

Maybe you have the privilege through a role and, when executing PL/SQL, you
need it explicitly for tue user.

-----Mensaje original-----
De: Sreedhar_Bhaskararaju
[mailto:oracledba-ezmlmshield-x5617469.[Email address protected]
Enviado el: martes, 28 de febrero de 2006 13:21
Para: LazyDBA Discussion
Asunto: 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.


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html



Oracle LazyDBA home page