Amazon

Friday, January 16, 2015

Oracle : Grants and checking Grants for a Schema

How would you enable one schema to do SELECT on another schema?

Step 1: Login to Srouce Schema SOURCE_SCHEMA, to provide grant to client schema
GRANT SELECT ON SRC_TAB TO CLIENT_SCHEMA;

Step 2: Login to Client Schema to select data from table present in source schema
SELECT * FROM SOURCE_SCHEMA.SRC_TAB;

Same steps can be used for UPDATE, DELETE and other ddl and dml grants.


How would you find from Client Schema that which tables of source schema are granted to Client Schema?

select * from USER_TAB_PRIVS where owner like 'SOURCE_SCHEMA';


How would you find the which objects (TABLE, FUNCTION, SEQUENCE etc) are present in a schema?

select * from ALL_OBJECTS where OWNER like 'SOURCE_SCHEMA' and OBJECT_TYPE like 'TABLE';

select * from ALL_OBJECTS where OWNER like 'SOURCE_SCHEMA' and OBJECT_TYPE like 'FUNCTION';

No comments:

Post a Comment

Amazon Best Sellors

Weblogic - Server Creation - Issues

Datasource creation using python script.  Python Script was failing after creating Datasource. From UI Admin Console, if I try to activat...