Are their any default privilege in Oracle for users?
Question
I want to grant new users in Oracle the normal rules, for example, create a table, delete table update, in general, the default CRUD operations. Every time I do this manually by running a grant script. Does Oracle come with default privilege group, for instance, create a user/schema with developer rules, create a user with DBA rules, without using the grant statement?
Solution
You can create a role and grant privileges to that role and in turn grant that role to a user.
To grant dba privileges to a user grant dba to someuser
You can explore default/current roles that gives you an idea.
select grantee role,privilege
from dba_sys_privs
where grantee not in (select username from dba_users)
-- and grantee in('DBA','CONNECT','RESOURCE')
group by grantee,privilege
order by 1
or
-- dba_roles data dictionay lists all roles existing/created in Oracle
select grantee role,privilege
from dba_sys_privs
where grantee in (select role from dba_roles)
group by grantee,privilege
order by 1
Keep in mind you have to be very careful before giving blanket privileges.
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange