Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> DBMS_SQL
Can someone help me?
Oracle 7.3.3 on NT 4.0
When user SCOTT execute:
DECLARE
CURSOR_NAME INTEGER;
RET INTEGER;
BEGIN
CURSOR_NAME := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(CURSOR_NAME,'CREATE TABLE BB(A NUMBER(3))',DBMS_SQL.V7);
RET := DBMS_SQL.EXECUTE(CURSOR_NAME);
DBMS_SQL.CLOSE_CURSOR(CURSOR_NAME);
END;
/
everything is OK
but when use a procedure like:
CREATE OR REPLACE PROCEDURE TEST(STRING IN VARCHAR2) AS
CURSOR_NAME INTEGER;
RET INTEGER;
BEGIN
CURSOR_NAME := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(CURSOR_NAME,STRING,DBMS_SQL.V7);
RET := DBMS_SQL.EXECUTE(CURSOR_NAME);
DBMS_SQL.CLOSE_CURSOR(CURSOR_NAME);
END;
/
and try to execute:
EXECUTE TESTE ('CREATE TABLE CC(A NUMBER(2))');
an error ocurr:
ERROR at line 1:
ORA-01031: insufficient privileges ORA-06512: at "SYS.DBMS_SYS_SQL", line 239 ORA-06512: at "SYS.DBMS_SQL", line 32 ORA-06512: at "SCOTT.TEST", line 6 ORA-06512: at line 1
Why????
Thnks
Miguel
Received on Fri Oct 23 1998 - 06:40:42 CDT