Tuesday, December 19, 2017

Granting Permissions to SYS Objects in AWS RDS

Granting Select to SYS Objects

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

--
-- Granting Permissions to SYS Objects in AWS RDS
--
-- On AWS RDS you do not have access to the server or
-- to a proper SYSDBA account.  
-- As a result you are defendant on lots of AWS RDS packages.
-- Or in some instances, you need to find new ways of 
--achieving the same thing
--
 
begin
    rdsadmin.rdsadmin_util.grant_sys_object(
        p_obj_name  => 'V_$SESSION',
        p_grantee   => 'USER1',
        p_privilege => 'SELECT');
end;
/


Granting Select to SYS Objects with the Grant Option

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

--
-- Granting Permissions to SYS Objects in AWS RDS
--
-- On AWS RDS you do not have access to the server or
 to a proper SYSDBA account.  
-- As a result you are defendant on lots of AWS RDS packages.
-- Or in some instances, you need to find new ways of 
achieving the same thing
--
 
begin
    rdsadmin.rdsadmin_util.grant_sys_object(
        p_obj_name     => 'V_$SESSION',
        p_grantee      => 'USER1',
        p_privilege    => 'SELECT',
        p_grant_option => true);
end;
/

No comments: