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

Home -> Community -> Usenet -> c.d.o.misc -> stored proc to create sequence, insufficent priv

stored proc to create sequence, insufficent priv

From: Ken Chesak <datavector_at_hotmail.com>
Date: 23 Apr 2003 09:26:24 -0700
Message-ID: <3f2f39c4.0304230826.64c298ff@posting.google.com>


I can create a sequence using sqlplus but when I put the same code in a stored procedure there is insufficient privileges. The same proc drops the sequence without an error.

execute sp_sequence;
sql = create sequence RIDES_DEV.xxx

                 increment by 1 start with 1
                 maxvalue 999999999999999999 minvalue 1 cache 20
nocycle noorder
BEGIN sp_sequence; END;

*
ERROR at line 1:

ORA-01031: insufficient privileges
ORA-06512: at "RIDES_DEV.SP_SEQUENCE", line 19
ORA-06512: at line 1


sp_sequence create or replace
as
begin

	v_sql := 'create sequence RIDES_DEV.xxx 
		 increment by 1 start with 1
		 maxvalue 999999999999999999 minvalue 1 cache 20 nocycle noorder';
	dbms_output.put_line('sql = '|| v_sql );
        execute immediate v_sql;
        

end; Received on Wed Apr 23 2003 - 11:26:24 CDT

Original text of this message

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