Re: Developer 2000: can't change a role

From: Mike Kogan <kogan_at_mtt.cell.ru>
Date: Thu, 16 Mar 2000 11:20:33 +0300
Message-ID: <38D09950.DAB4D4CC_at_mtt.cell.ru>


The form was run in debug mode. I tried the code in the interpreter pane of Forms Debagger.
Debagger said:

PL/SQL> begin
     +> DBMS_SESSION.SET_ROLE('xxx identified by xxx');
     +> end;

ORA-00600: internal error code, arguments: [15450], [], [], [], [], [], [], [] ORA-06512: at "PU_002", line 2
PL/SQL> Now created new role stest and new user btest Copyright (c) Oracle Corporation 1979, 1996. All rights reserved. Connected to:
Oracle7 Server Release 7.2.2.4.0 - Production Release With the distributed, replication and parallel query options PL/SQL Release 2.2.2.3.0 - Production
SQL> create role stest not identified;
Role created.
SQL> grant alter any role to stest;
Grant succeeded.
SQL> create user btest identified by test; User created.
SQL> grant create session to btest;
Grant succeeded.
SQL> grant alter any role to btest;
Grant succeeded.
SQL> grant stest to btest;
Grant succeeded.
SQL> connect btest/test_at_rst_old
Connected.
SQL> begin
  2 dbms_session.set_role('stest');
  3 end;
  4 /
PL/SQL procedure successfully completed. SQL> I recompiled form TEST.fmb with
DBMS_SESSION.SET_ROLE('stest');
in WHEN-NEW-FORM-INSTACE trigger.
Then ran Runtime
F50RUN32.EXE TEST.fmx btest/test_at_rst_old

Runtime said
FRM-40735: WHEN-NEW-FORM-INSTACE trigger raised unhandled exception ORA-00600 :-(

Mike Dwyer wrote:

> I tried your code in a test form (v5.0.6) and it seems to work fine in
> either trigger, as simply:
> DBMS_SESSION.SET_ROLE('RESOURCE');
>
> The error documentation on ORA-00600 suggests there may be another
> underlying error. ORA-00600 is supposed to provide several string values in
> the error text. What does your full error message look like?
>
> Mike Dwyer <dwyermj_at_co.larimer.co.us> wrote in message
> news:_OOz4.17$GC2.10591_at_wdc-read-01.qwest.net...
> > >> > begin
> > >> > DBMS_SESSION.SET_ROLE('a_role identified by passwd');
> > >> > end;
> > >>
> > 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
> > >
> > >
> >
> >

--
Best wishes,
 Mike
Received on Thu Mar 16 2000 - 09:20:33 CET

Original text of this message