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);

No comments:

Snowflake - Cost Optimization

Reduce auto-suspend to 60 seconds Reduce virtual warehouse size Ensure minimum clusters are set to 1 Consolidate warehouses Separate warehou...