Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Change password of a user from stored procedure

Re: Change password of a user from stored procedure

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 20 Apr 1998 22:32:13 GMT
Message-ID: <353dccc2.36796720@192.86.155.100>


A copy of this was sent to Jackie Marino <Jackie.A.Marino_at_wgp.twc.com> (if that email address didn't require changing) On Mon, 20 Apr 1998 19:29:30 GMT, you wrote:

>Connor McDonald wrote:
>>

[snip]

>I created the above procedure, but when I try to change a user's
>password or create a user, oracle gives me the insufficient priviledges
>error. I created the procedure under my schema and tried to execute it
>from my schema. I have the dba role. I can create and alter a user from
>the regular prompt, but not through the procedure. Do you know why?

roles are never enabled during the execution of a procedure.

Try this:

SQL> set role none;
SQL> "statement you want to test to see if it'll work in a procedure"

If you can do it in plus with no roles you can do it in a procedure. If you can't, you must have the privelege from a role and hence dbms_sql won't be able to do it either.

You probably have the privelege to do what you are trying to do in dbms_sql via a role. Grant the privelege directly to the owner of the procedure and it'll work. (grant alter user to YOU)  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Apr 20 1998 - 17:32:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US