Thursday, 4 July 2013

Oracle: Grant/Revoke Privileges example

You can grant users various privileges to tables. These privileges can be any combination of select, insert, update, delete, references, alter, and index

To view the grant permission of all tables:

select *from user_tab_privs;

Grant permission:

grant select, insert on sales to test with grant option;

here.,
tiara-Grantor
sales-table name
test-Grantee

Revoke Permission:

revoke all on sales from test;

Login in as "test" user:

To view the grantor tables:

select *from tiara.sales;

Insert values in grantor tables:

insert into tiara.sales values(41411,'Ganesh','Chennai','Tamilnadu',444);

DBT - Models

Models are where your developers spend most of their time within a dbt environment. Models are primarily written as a select statement and ...