create role and give privileges to it

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
edson.amorim
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 135
Joined: Thu, 04 Oct 2007 3:36 pm
Location: Belo Horizonte - MG

Dear colleague,

How do I see the attributes or privileges of a role? How to create these privileges in the role?

Sincerely,
pauloaleo
Rank: DBA Júnior
Rank: DBA Júnior
Posts: 181
Joined: Wed, 09 Feb 2005 12:30 pm
Location: SÃO BERNARDO DO CAMPO - SP

See DBMS_Rule_ADM documentation.

is with her that you contro rules, privileges, etc.

Hugs
CarlosStetner
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 16
Joined: Fri, 14 May 2010 8:06 pm
Location: São José dos Campos - SP
O Primeiro passo não vale nada se você não chegar ao final.

Friend to give Grant in role is the same as Grant to User.

Grant Select on Table to Grant

To know the Grants You can look at DBA_ROLE_PRIVS
igor.rmarinho
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 58
Joined: Sat, 13 Mar 2010 5:12 pm
Location: MG

An example:

Select all

CREATE ROLE RH; 
GRANT CONNECT TO RH; 
 
GRANT SELECT,UPDATE ON RH_EMP TO RH; 
 
CREATE ROLE HR_GERERENTE IDENTIFIED BY A123; -- CRIA UMA ROLE COM SENHA 
 
GRANT INSERT, DELETE  ON RH_EM TO RH_GERENTE; 
 
GRANT RH TO RH_GERENTE;
In this case the Role rh_gherente has the privilegio of the Rhol + AS which were only assigned to it
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest