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

Home -> Community -> Usenet -> c.d.o.server -> stored procs executing DDL

stored procs executing DDL

From: C. <c_ferguson_at_rationalconcepts.com>
Date: Wed, 16 Jun 1999 22:59:00 -0700
Message-ID: <37688EA4.9AA041C2@rationalconcepts.com>


Hi everyone, I need some explanation as to what's going on. The following, when executed throws ORA-1031, and the question is why. It's created in the system account and run as the system user, and still throws the exception on the DBMS_SQL.PARSE statement.

CREATE OR REPLACE PROCEDURE test1 AS

    v_Cursor INTEGER;
    v_SQLStatement VARCHAR2(4000);
BEGIN
  v_Cursor := DBMS_SQL.OPEN_CURSOR;
  v_SQLStatement := 'create table test1table(name varchar2(45) not null)';

  DBMS_SQL.PARSE(v_Cursor, v_SQLStatement, DBMS_SQL.V7);   DBMS_SQL.CLOSE_CURSOR(v_Cursor);
EXCEPTION
  WHEN OTHERS THEN

       DBMS_SQL.CLOSE_CURSOR(v_Cursor);
       DBMS_OUTPUT.PUT_LINE(SQLERRM);

 END test1;
/

GRANT EXECUTE ON test1 to PUBLIC;
COMMIT; I am using Oracle 8.0.4 on Solaris 2.6. If you respond via email, please email me at c_ferguson_at_rationalconcepts.com
Thanks in advance,
Cindy Ferguson Received on Thu Jun 17 1999 - 00:59:00 CDT

Original text of this message

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