I have a homegrown tool that I’m using to create a new Oracle user and set some permissions for that user. I have a utility user that I’m using to execute the script that creates the user and grants its roles and privileges. My current problem is that I get an ORA-01031: insufficient privileges
error when I am trying to run this statement in my tool:
grant execute on dbms_rls to mynewuser;
This tool runs through a Windows ODBC data source using the Oracle 12.02.00.01 ODBC driver, FWIW. The user that’s executing this statement has execute privs on dbms_rls with grant option. The weirdest thing IMO though is that I can run the same grant statement as the same user in sqlplus and it works without any problems. I am sure I’m logged in as the same user in both cases.
So, I guess my question is two parts. First, what privileges must my utility user really have in order to grant execute on dbms_rls to my new user? Second, why do I get a different result when executing this via sqlplus versus my app using odbc?