0

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?

2

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.

  • Thanks, I will consider that really helpful. – Osama Al-Banna Dec 26 '19 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.