Managing Oracle on AWS has some twists. Here are five daily DBA activities that have changed on AWS:
Kill Sessions:
begin rdsadmin.rdsadmin_util.kill( sid => &sid, serial => &serial, method => 'IMMEDIATE'); end; /
Flush shared_pool or buffer_cache:
exec rdsadmin.rdsadmin_util.flush_shared_pool; exec rdsadmin.rdsadmin_util.flush_buffer_cache;
Perform RMAN Operations:
BEGIN rdsadmin.rdsadmin_rman_util.validate_database( p_validation_type => 'PHYSICAL+LOGICAL', p_parallel => 4, p_section_size_mb => 10, p_rman_to_dbms_output => FALSE); END; /
Grant Privileges to SYS Objects
# Grant
begin rdsadmin.rdsadmin_util.grant_sys_object( p_obj_name => 'V_$SESSION', p_grantee => 'PYTHIAN', p_privilege => 'SELECT'); end; /
# Grant with Grant Option
begin rdsadmin.rdsadmin_util.grant_sys_object( p_obj_name => 'V_$SESSION', p_grantee => 'PYTHIAN', p_privilege => 'SELECT', p_grant_option => true); end; /
# Revoke
begin rdsadmin.rdsadmin_util.revoke_sys_object( p_obj_name => 'V_$SESSION', p_revokee => 'PYTHIAN', p_privilege => 'SELECT'); end; /
Create Custom Functions to Verify Passwords:
begin rdsadmin.rdsadmin_password_verify.create_verify_function( p_verify_function_name => 'CUSTOM_PASSWORD_FUNCTION', p_min_length => 12, p_min_uppercase => 2, p_min_digits => 1, p_min_special => 1, p_disallow_at_sign => true); end; /
If you want to double-check the generated code, here’s simple trick: Check on DBA_SOURCE:
col text format a150 select TEXT from DBA_SOURCE where OWNER = 'SYS' and NAME = 'CUSTOM_PASSWORD_FUNCTION' order by LINE;
I hope this helps!
1 Comment. Leave new
how to compile a package in RDS?