Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> stored proc to create sequence, insufficent priv
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 20nocycle noorder
*
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