I'm working with 2 Oracle 19C instances: Instance1 and Instance2
Users have certain roles and resulting privileges on tables in Instance1. I have a DB link from Instance1 to Instance2 and a schema in Instance 2 that has access to all tables for all users. In Instance2 I've created views in that 'all access' schema to all tables in Instance1.
I'm looking for the most straightforward way to ensure that users logging into Instance2 have the same privileges in Instance2 as they do in Instance1. In other words, they would only be able to access views in Instance2 to which they have access in Instance1 based on their roles in Instance1.
DBAs have provided me a view from Instance1 that provides the following fields: User, Role, Table_Name, Type (view/table), Privilege (Select/etc.)
Are there existing out-of-the-box or well-known/shared procedures/scripts that can take this view as input and create/update roles and run grant commands on views in Instance2 such that Instance1 and Instance2 are in sync and users only have access to Instance2 views that match their permissions in Instance1?
Thank you.