Hi, @Velmurugan Thanks for the ask in the Microsoft Q&A forum,
I see you have posted the same query in another post here I have responded to the post with a query to extract user roles and provided documents in Postgres to create the same.
Please let us know if you need any further information, we are happy to provide you with more information in solving your problem.
step 1: Create an ora2pg migration project
step 2: Set up the correct ora2pg config file parameters
step 3: Run ora2pg to export users and grants to a file
step 4: execute output file ("grants.sql") against Azure Database for PostgreSQL
Here is an example:
Go to oracle and run the following:
create role rl_read_hr;
grant select on hr.departments to rl_read_hr;
grant select on hr.countries to rl_read_hr;
grant select on hr.jobs to rl_read_hr;
grant select on hr.job_history to rl_read_hr;
grant rl_read_hr to hr_read;
re-run your ora2pg command, such as:
ora2pg -p -t GRANT -o grant.sql -b c:\demo\demo_mig -c c:\demo\demo_mig\config\demo_conf.conf
Please let me know if you find the above reply useful. If yes, do click on 'Mark as answer' link in the above reply. This will help other community members facing similar queries to refer to this solution.
Regards
Geetha