Re: Create user

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 24 Sep 2002 01:45:11 -0700
Message-ID: <a20d28ee.0209240045.4c086b7c_at_posting.google.com>


"Jul" <Julia.Sats_at_sympatico.ca> wrote in message news:<TKPj9.1927$wj3.351106_at_news20.bellglobal.com>...
> PROCEDURE a_add_user IS
> v_str varchar2(100);
> n_cursor number;
> BEGIN
> n_cursor := dbms_sql.open_cursor;
> v_str := 'create user M identified by M';
> dbms_sql.parse(n_cursor, v_str, dbms_sql.native); <== ERROR HERE
> dbms_sql.close_cursor(n_cursor);
>
> END;
>
> ORA-01031: insufficient privileges
>
> Procedure was created and run by user with DBA privileges
>
> I can not run this code under Oracle 8.0 . Any ideas ?
>
> Thanks

Privilege through a role, and roles are ignored during compilation of procedures. You need direct privilege.
This problem has been answered at least a thousand times here, *PLEASE* search the archives *BEFORE* wasting someones time again.

8.0 has been desupported more than a year ago, and creating users on the fly, *without* passwords is a very bad idead.

Regards

Sybrand Bakker
Senior Oracle DBA Received on Tue Sep 24 2002 - 10:45:11 CEST

Original text of this message