Wednesday, October 2, 2019

Oracle Roles - onenote lbm


create procedure ksomaiya.dba_parse_$$( p_cur in number, p_str in varchar2 )
as
begin
dbms_sql.parse( p_cur, p_str, dbms_sql.native );
end;
/


declare
exec_cursor integer default dbms_sql.open_cursor;
rows_processed number default 0;
sql_stmt varchar2(255);
begin
sql_stmt := 'grant all on ODS2.PURCHASE_ANALYSIS_CODE_MAST to ODS2_READ_WRITE';
ksomaiya.dba_parse_$$( exec_cursor, sql_stmt );
rows_processed := dbms_sql.execute(exec_cursor);
dbms_sql.close_cursor( exec_cursor );
end;
/

select * from ODS2.PURCHASE_ANALYSIS_CODE_MAST;

select * from session_roles;


No comments:

Post a Comment