Re: WebDB: form based on view creation problem

From: Leo Van Nieuwenhuyse <leo.van.nieuwenhuyse_at_pandora.be>
Date: Sat, 15 Apr 2000 18:55:22 GMT
Message-ID: <uW2K4.89305$l35.182530_at_afrodite.telenet-ops.be>


Wich version of webdb?
[Quoted] In 2.2(I presume in other versions too) there's a bug in the package wwv_utlbuild of the webdb schema:
In the function validate_table_names you'll find the next code:

elsif l_type_name = 'ADFORM' then

        l_owner := wwv_utlattr.get_attribute_value_byname('P_OWNER');
        l_name :=
upper(wwv_utlattr.get_attribute_value_byname('P_REPORT_TABLES'));
        if l_name is null or l_name = wwv_global.NULLVALUE then
            wwv_stderr.stack_error('WWV_UTLBUILD.VALIDATE_TABLE_NAMES',
[Quoted] 13021, l_obj_type);
            wwv_builder.show_error('WWV_UTLBUILD.VALIDATE_TABLE_NAMES: Table
[Quoted] Name cannot
                                    be NULL');
            return false;
        end if;

        for c in (select owner || '.' || object_name name
                      from all_objects
                  where object_type in ('TABLE','VIEW')
                      and owner = l_owner
                  union
                  select table_schema || '.' || table_name name
                      from all_tab_privs
                  where grantee in (l_owner, 'PUBLIC') and privilege =
'SELECT')
      loop

The select is done form ALL_TAB_PRIVS, wich means that you will never see [Quoted] objects your schema granted to another schema or role! Why? Webdb is the [Quoted] owner of the procedure and since webdb has not been granted access all_tab_privs will not show the table you want.

I solved this by replacing in the code the last select by:

select owner || '.' || table_name name

                      from dba_tab_privs
                  where grantee in (l_owner, 'PUBLIC') and privilege =
'SELECT'). If you do not want to change in webdb's code you can do the following:
  1. Grant the rights on your table to PUBLIC
  2. Create the module, webdb will see the table now
  3. Revoke the rights on your table from PUBLIC
  4. Put the right grants to the right roles or schemas.

Let me know if you succeeded.
<spj95_at_hotmail.com> schreef in berichtnieuws 8d86ij$efq$1_at_nnrp1.deja.com...
>
>
> I am trying to create a form based on a view but am getting the error
> message:
>
> "WWV-13020 This Table does not exist or you do not
> have the required privileges.
>
> WWV_UTLBUILD.VALIDATE_TABLE_NAMES"
>
>
> I have two schemas, one for the data I am basing the form on (tables
> and views - DATA) and a component building schema for storing the
> WebDB objects (WEB_COMPONENTS).
>
> I created a WEB_DEV user as a WebDB developer with buildin privileges
> on the WEB_COMPONENTS schema and granted this user all privileges
> (select, insert, update, delete) on the view in the DATA schema.
>
> However, when I try to create a form based on this view it displays
> the above error. (I can select the view from the popup dialog).
>
> Am I missing something with the privileges?
>
> Any help in this matter would be greatly appreciated.
>
> Thanks,
>
> Steve
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sat Apr 15 2000 - 20:55:22 CEST

Original text of this message