Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: create user in PL/SQL package e.t.c.
Well, this sqlplus command executes a very PL/SQL command which can be put into PL/SQL package.
I don't have that much time to write a complete solution for OP (and I never will), but my post should be good enough for providing the right direction to continue with.
Tanel.
"Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message news:1063722628.793817_at_yasure... Tanel Poder wrote:
Hi!
SQL> exec execute immediate 'create user y identified by y';
PL/SQL procedure successfully completed.
SQL> exec execute immediate 'grant create session to y';
PL/SQL procedure successfully completed.
SQL> connect y/y
Connected.
SQL>
Tanel.
I'd suggest reading a bit more carefully ... the SQL*Plus command line hardly qualifies as a PL/SQL package.
The only solution to what the OP asked is dynamic SQL to handle CREATE USER and the grants.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Tue Sep 16 2003 - 10:34:03 CDT