Duplicate grants

Rahim KanjiyaniRahim Kanjiyani Posts: 7 Bronze 2
edited February 21, 2020 4:56PM in Source Control for Oracle
Hello,

I have upgraded my Source Control for Oracle from 3.x to the latest version (5.x). How do I generate grants for oracle roles in the latest version?

for example, grant select on <table> to <oracle_role>;

Thanks,
Rahim
Tagged:

Answers

  • Rahim KanjiyaniRahim Kanjiyani Posts: 7 Bronze 2
    edited February 18, 2020 10:39PM
    Never mind, it looks like that grants are generated completely differently in 5.x. 

    I can see grants to oracle roles under object files. Previously, role grants were under role specific file name.
  • It looks like that grants are duplicated in schemas.

    For example, I have grants from schema A to Schema B. When I generate source for Schemas A and B together, the grants are duplicated under UserObjectPrivileges in Schema A and B both.

    Is this the desired behaviour?
  • Eddie DEddie D Posts: 1,780 Rose Gold 5
    Hi, thank you for your forum post.

    Grants were split into Object Grants and System Grants in V3.1.8 back in May 2017, along with various bug fixes in the versions released between V3.1.8 ->V4.* ->V5.* ->V5.7.0.

    Are you still using the existing project created in V3.*?  If my memory is correct (thinking back to May 2017) there was some weirdness where the UserObjectPrivileges still needed to be deployed but the subsequent refresh the problem resolved itself.  Thereafter the UserObjectPrivileges were no longer seen as they become Object grants.

    Alternatively create a new project.

    Hope the above helps.
    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Hi Eddie,

    Yes, I have created new project and I can see that grants feature is completely redesigned in the latest version.

    My question now is on duplicate grants.

    For example, I have grants from Schema A to B. When I generate schema source code for both schemas together, the grants are duplicated in both Schema A and B. Is this an expected behavior?

    Thanks,
    Rahim
  • Eddie DEddie D Posts: 1,780 Rose Gold 5
    Hi Rahim,
    Thank you for your reply.

    Are you able to provide an example and (if possible) screenshots of what you experience with the duplicate Grants?

    Many thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Hi Eddy,

    I have schemas called BANINST1 and BANSECR.

    I have following grant on BANINST1 object to BANSECR.

    For example, GRANT EXECUTE ON baninst1.gb_common TO bansecr;

    This grant is duplicated in BANSECR and BANINST1 both. See screenshots below.




  • Eddie DEddie D Posts: 1,780 Rose Gold 5
    Hi,

    In the recent Source Control for Oracle releases, the development team have made improvements to this area of the product.  If you have not already done so, can you please upgrade to V5.7.10.444 and confirm if you still experience the problem?

    To upgrade either use the Check for Updates option in the help menu of the GUI or use this link to download.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.