Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Create user via stored proc/package ?
I'm a bit confused about using DBMS_SQL package as although I've used Oracle for quite a while now
it's mainly been via VB!
What I was hoping to do was to call a function to create a new user, modify a user etc...
So for example -
CREATE OR REPLACE PROCEDURE create_user (username IN VARCHAR2, password IN VARCHAR2) IS BEGIN CREATE USER username identified BY password; /* worry about roles etc.. later */ END;
How woud this procedure look using the DBMS_SQL package?
Any ideas
Thanks
Adrian Harrison
On Wed, 30 Jun 1999 12:58:23 +0100, "Steve B" <steve.bright_at_capgemini.co.uk> wrote:
>You can use the DBMS_SQL package to write dynamic sql statements, including
>DDL..
>
>Note : Since you will be running these statements from within stored
>procedures then grant create / alter user etc must be expicitly granted to
>the user running the procedures, and not granted via roles..
>
>hope this helps
>
>
>
>Cheers
>
>Steve Bright
>
>steve.bright_at_capgemini.co.uk
>
>Adrian Harrison wrote in message <3779f20e.11439609_at_news.globalnet.co.uk>...
>>Using VB6 Enterprise & Oracle 7.34
>>
>>Is it possible to use "CREATE USER", "ALTER USER" etc.. statements in a
>stored procedure or package
>>so that I can call them from my program thereby providing full user
>maintainence ?
>>
>>If not what's the best I can achieve?
>>
>>Thanks
>>
>>Adrian Harrison
>
Received on Thu Jul 01 1999 - 09:23:12 CDT
![]() |
![]() |