1 Reply Latest reply on Nov 1, 2019 8:58 AM by John_K

    grant synonym on view to custom user

    lmu

      Database 12.1.0.2

      E-Business 12.2.3

      OS Linux 6

       

      A user wants a grant on a synonym of an object that is a view.

       

      I know to use AD_ZD.grant_privs but what do I grant it on? The synonyms  owned by apps, the view  owned by apps or the underlying tables owned by inv?

       

      I was told granting on the synonym using AD_ZD would automatically grant on the underlying tables and views.   if I look in dba_tab_privs, I don't see that is the case.

       

      Doesn't a user need a grant on the underlying tables to see a view or is an old way to see it?

       

      This is what they want.

      GRANT SELECT ON APPS.MTL_CROSS_REFERENCES TO XX_DIRT;

      GRANT SELECT ON APPS.MTL_CATEGORIES_KFV TO XX_DIRT;

       

      MTL_CROSS_REFERENCES is a synonym on MTL_CROSS_REFERENCES_VL

      and

      MTL_CATEGORIES_KFV is a sysnonym on the view MTL_CATEGORIES_B_KFV

       

      The view MTL_CROSS_REFERENCES_VL is on the tables:

      table:  inv.MTL_CROSS_REFERENCES_B

      table:  inv.MTL_CROSS_REFERENCES_TL

      and

      The view MTL_CATEGORIES_KFV is on the table inv.MTL_CATEGORIES_B

       

      I assume their query is using synonyms APPS.MTL_CROSS_REFERENCES & APPS.MTL_CATEGORIES_KFV

       

      Also in 12c, you can grant 'read' instead of select. Wouldn't that be better?