Home > oracle, oracle forms&reports > FRM-41810: Menu security in Oracle Forms 10g release 2

FRM-41810: Menu security in Oracle Forms 10g release 2

I’m migrating an app from forms 9i to forms 10g release 2.

The menus uses role security, I’ve compiled the forms in 10g release 2 and when I open the form I get this chain of errors:


FRM-41810: Error creating menu
FRM-10256: User is not authorized to run form builder menu
FRM-41810: Error creating menu
FRM-10205: Menu not found
FRM-40105: Unable to resolve reference to item %s.

I have encountered this problem at other times, but I settled for the fast-track: disable the menu security.

But today I feel inspired and I wanted to find a solution. After trying different things, I’ve found this oracle note: Implementing and Troubleshooting Menu Security in Forms [ID 28933.1]

To implement menu security in Oracle Forms 9.0.x, 10.1.2 or 11.1.x you have to create an old compatibility view, execute this in SQL*Plus as SYSTEM user:
For 9.0.x:


SQL> @$ORACLE_HOME\tools\dbtab90\forms90\frm90sec.sql;

For 10.1.2 or 11.1.x:


SQL> @$ORACLE_HOME\tools\dbtab\forms\frmsec.sql;

The script, in 10g is this:


create or replace view FRM50_ENABLED_ROLES as
select urp.granted_role role,
sum(distinct decode(rrp.granted_role,
 'ORAFORMS$OSC',2,
 'ORAFORMS$BGM',4,
 'ORAFORMS$DBG',1,0)) flag
from sys.user_role_privs urp, role_role_privs rrp
where urp.granted_role = rrp.role (+)
 and urp.granted_role not like 'ORAFORMS$%'
group by urp.granted_role;

create public synonym FRM50_ENABLED_ROLES for system.FRM50_ENABLED_ROLES;

create role ORAFORMS$OSC;
create role ORAFORMS$DBG;
create role ORAFORMS$BGM;

Now, grant select access to the view created:


SQL> grant select on frm50_enabled_roles to public;

And now, from a user account, test the view:


SQL> select * from frm50_enabled_roles;

If you can see values, the menu security must work in Forms 10g.

  1. Patrick Holmes
    December 14, 2016 at 1:03

    Thank you for sharing this! It saved us. We have a couple of complicated Oracle Forms 6i forms, and now they work (unsupported, of course) with Oracle 12c DB! We are trying to postpone rewriting them to something else indefinitely…

    Like

    • December 14, 2016 at 18:19

      Hi Patrick. Glad to know that works with 12c DB!

      Like

  2. Zino
    June 25, 2015 at 16:54

    SUPER!!!
    This helped>>>>grant select on frm50_enabled_roles to public;

    Like

  3. Drivera
    May 7, 2014 at 17:57

    Excellent!!! that was! thanks you very much.

    Like

  4. kwame asuah
    October 2, 2012 at 14:23

    Good job man. It worked

    Like

  1. No trackbacks yet.

Leave a comment