Home Oracle Oracle dba_role_privs
Oracle dba_role_privs PDF Print E-mail
Written by Siva   
Wednesday, 21 February 2018 20:11





SQL> select * from dba_role_privs where grantee = 'TKREAD';


GRANTEE                        GRANTED_ROLE                   ADM DEF

------------------------------ ------------------------------ --- ---

TKREAD                         CONNECT                        NO  YES

TKREAD                         RESOURCE




SQL> grant connect, resource, dba to TKREAD;


Grant succeeded.



SQL> connect tkread/tkread;

Connected.


SQL> CREATE PUBLIC SYNONYM MAGI_IMPORT_DEALERS FOR MAGI.IMPORT_DELAERS;


Synonym created.


SQL> select count(*) from magi_import_dealers;

select count(*) from magi_import_dealers

*

ERROR at line 1:

ORA-00980: synonym translation is no longer valid



SQL> select count(*) from magi.import_dealers;


COUNT(*)

----------

15582



SQL> show user

USER is "TKREAD"


SQL> create or replace synonym magi_import_dealers for magi.import_dealers;


Synonym created.


SQL> select count(*) from magi_import_dealers;


COUNT(*)

----------

15582


SQL> connect system/system1

Connected.

SQL>



SQL> select * from dba_role_privs where grantee = 'TKREAD';


GRANTEE                        GRANTED_ROLE                   ADM DEF

------------------------------ ------------------------------ --- ---

TKREAD                         DBA                            NO  YES

TKREAD                         CONNECT                        NO  YES

TKREAD                         RESOURCE                       NO  YES


SQL> revoke dba from TKREAD;


Revoke succeeded.


SQL> select * from dba_role_privs where grantee = 'TKREAD';


GRANTEE                        GRANTED_ROLE                   ADM DEF

------------------------------ ------------------------------ --- ---

TKREAD                         CONNECT                        NO  YES

TKREAD                         RESOURCE                       NO  YES


SQL> connect tkread/tkread;

Connected.

SQL>  select count(*) from magi_import_dealers;


COUNT(*)

----------

15582


SQL>

 

Last Updated on Wednesday, 21 February 2018 20:38
 
 

Advertisement

Featured Links:
HREmail.com
Looking for job? Try HREmail.com
Want to have CMS based Websites?
Try siliconwebcreators.com to CMS based websites.
VM Solutions Inc
For best VM solutions..
Digital Procedure Inc.
Looking for Oracle /SAP /Weblogic Consulting services? visit digitalprocedure.com