a simple question [message #3060] |
Mon, 02 September 2002 22:55 |
oranew
Messages: 6 Registered: January 2002
|
Junior Member |
|
|
Hi,
could anyone explain why DDL can not be used directly in PL/SQL procedure? Thanks a lot in advance.
|
|
|
Re: a simple question [message #3065 is a reply to message #3060] |
Tue, 03 September 2002 00:24 |
neetu
Messages: 2 Registered: September 2002
|
Junior Member |
|
|
hi
plz explain me the internal archieture of database.
plz give me the details ofconcetual model?????
also give me the previous paper of ocp.
|
|
|
Re: a simple question [message #3076 is a reply to message #3060] |
Tue, 03 September 2002 04:59 |
Christine Pollhaus
Messages: 18 Registered: May 2002
|
Junior Member |
|
|
Hi oranew,
it can indeed:
For example: automatically create a new user like I did:
CREATE OR REPLACE
PROCEDURE NEWUSER (user_in IN CHAR, pw_in IN CHAR)
IS
BEGIN
EXECUTE IMMEDIATE
'CREATE USER '||user_in||' IDENTIFIED BY '||pw_in||' DEFAULT TABLESPACE <type tablespacename here> TEMPORARY TABLESPACE <type tablespacename here> ';
EXECUTE IMMEDIATE
'GRANT <type grant or rolename here> TO '||user_in||' ';
End;
But: Attention: please don't forget to give create user privilege, grant privilege and grant any role privilege (if neccessary) to the user who owns and executes this procedure!
hope it helps ! Greetings!
|
|
|