Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: DDL and Dynamic SQL
On 04-Nov-98 18:19:14 mmellin wrote:
[...]
>CREATE OR REPLACE PROCEDURE RESPONSENOW.SP_ADDUSER
>(username_in IN VARCHAR2,
> password_in IN VARCHAR2,
> tablespace_in IN VARCHAR2,
> temp_tablespace_in IN VARCHAR2)
> IS
> adduser_cursor INTEGER;
> exec_user INTEGER := 0;
> BEGIN
> adduser_cursor := dbms_sql.open_cursor;
> dbms_sql.parse(adduser_cursor,
> 'CREATE USER '||username_in||'
> IDENTIFIED BY '||password_in||'
> DEFAULT TABLESPACE '||tablespace_in||'
> TEMPORARY TABLESPACE '||temp_tablespace_in||'
> QUOTA UNLIMITED ON '||tablespace_in||'
> QUOTA UNLIMITED ON '||temp_tablespace_in||'' , DBMS_SQL.V7);
> exec_user := dbms_sql.execute(adduser_cursor);
> dbms_sql.close_cursor(adduser_cursor);
>END;
Try ommiting the dbms_sql.execute line.
DDL commands are executed upon parsing. So an explicit execute is not
necessary. In your case it most likely produces the errors.
Hope that helps,
Lothar
--
Lothar Armbrüster | lothar.armbruester_at_rheingau.netsurf.de Schulstr. 12 | lothar.armbruester_at_t-online.de D-65375 Oestrich-Winkel |Received on Wed Nov 04 1998 - 13:21:41 CST