So there I was, working on a request to determine if users in the database are read only or read write. Sounds pretty simple, right?
Someone once said, “Good artists copy, great artists steal.” In my case, there was nothing to steal.
Basically, there are system, role, table, and column privileges which can be granted to role or user.
In general, a user is considered to be read only if the user only has SELECT|SESSION|QUERY REWRITE|READ|REFERENCES and certain predefined EXECUTE on stored procedure.
If a user’s schema contains tables, is this user read only or read write?
Demo here
Did I missed anything and what you would have included or excluded?
