Re: Developer 2000: can't change a role

From: Mike Dwyer <dwyermj_at_co.larimer.co.us>
Date: Wed, 15 Mar 2000 09:20:15 -0700
Message-ID: <_OOz4.17$GC2.10591_at_wdc-read-01.qwest.net>


>> > begin
>> > DBMS_SESSION.SET_ROLE('a_role identified by passwd');
>> > end;
>>

[Quoted] Just a wild guess, Mike; it's been a few years in another shop, but play with the semicolons in your code -
Add a second one after the dbms_session statement or after the end.

Also, you might try executing the code in a PRE_FORM trigger instead of When-New-Form-Instance

Mike Kogan <kogan_at_mtt.cell.ru> wrote in message news:38CF4573.C0E346E2_at_mtt.cell.ru...
> I created the roles and granted them to the user.
>
> dbms_session.set_role (the_role identified by the_password);
>
> works properly from SqlPlus (from anonymous PL/SQL block) for the user
but it
> doesn't work from Forms 5 for the same user!
> Now, when I have found that the code doesn't work in Forms my form has the
only
> WHEN-NEW-FORM-INSTANCE trigger with the only statement. Nevertheless the
> ora-00600 (internal error code) is being occurred.
>
> Thank you very much for your help and kind attention.
>
> Neville Sweet wrote:
>
> > We are using Oracle 8.0.5, but were using 7.1.6.2.0 until a year ago.
The
> > library procedure has been in use for a number of years.
> >
> > The library procedure reads all roles from dba_role_privs for the
current
> > user, packs a comma-delimited string of all granted roles, and issues
> > dbms_session.set_role (all roles have the same password). We do this
because
> > for security reasons all update roles are disabled by default, and
enabled
> > after logon to a form. One of the pre-requisites for
dbms_session.set_role
> > is that the roles must have already been granted to the user, but since
the
> > roles are selected from dba_role_privs this condition is obviously met.
> > Have you created the roles and granted them to the user?
> >
> > Hope this helps,
> > Neville.
> >
> > >Your Name wrote in message
> > <01bf8dc9$9e0a95e0$6740e783_at_pc95-adpsb.lboro.ac.uk>...
> > >Mike,
> > >
> > >I don't know if you had any success with Neville's suggestion but we
are
> > still getting Oracle error messages when trying to set role. If >you or
> > Neville have a solution could you please give us some further details.
> > >
> > >Regards
> > >Pali Bains
>
> --
> Best wishes,
> Mike
>
>
Received on Wed Mar 15 2000 - 17:20:15 CET

Original text of this message