Thank you as usual
ls cheng, December 23, 2001 - 7:26 pm UTC
Thank you Tom for answering my question on Sunday!
A reader, January 10, 2003 - 3:09 pm UTC
Can you help me on this please? Why is this procedure generationg error? It is compiled and run as a user with DBA privilage. I am getting no clue what is going on here!!
Thanks for all your help.
SQL> ed
Wrote file afiedt.buf
line 17 truncated.
1 create or replace procedure
2 pr_create_user( p_user in varchar2,
3 p_passwd in varchar2 )
4 as
5 st varchar2(100);
6 begin
7 st:='create user '||p_user||' identified by '||p_passwd||'
8 default tablespace users temporary tablespace temp';
9 dbms_output.put_line(st);
10 execute immediate st;
11 -- execute immediate 'grant connect to '||p_user;
12 dbms_output.put_line(p_user||' Created.');
13 exception
14 when others then
15 dbms_output.put_line(sqlerrm);
16* end;
17 /
Procedure created.
SQL> exec pr_create_user('abcd', 'abcd');
create user abcd identified by abcd
default tablespace users temporary
tablespace temp
ORA-01031: insufficient privileges
PL/SQL procedure successfully completed.
SQL> create user abcd identified by abcd
2 default tablespace users temporary
3 tablespace temp
4 /
User created.
SQL> drop user abcd;
User dropped.
January 10, 2003 - 3:49 pm UTC