AWS's Top 5 Commands: ALTER SYSTEM and Managing SYS Objects in RDS
We often manage services over EC2, this is not news. But when migrating to Amazon RDS, it's usual for new users to have issues with performing some administrative actions on the database, especially when it's done via internal Oracle procedures or when it requires privileges beyond the ones we have available on RDS credentials, even though they are part of DBA work. Amazon Web Services created internal procedures so we can still execute those actions, but in a different manner. I decided to list five daily basis commands / procedures that frequently cause questions for initial users. Here it goes: 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;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; /Hope this helps!
Share this
Previous story
← OEM 13c Monitoring Features - Part 1
Next story
Are reverse cloud migrations a thing? →
You May Also Like
These Related Stories
AWS RDS: 5 Must-Know Actions for Oracle DBAs
AWS RDS: 5 Must-Know Actions for Oracle DBAs
Jun 3, 2020
1
min read
Locating most current record using ROW_NUMBER() vs. Index Full Scan (Min/Max)
Locating most current record using ROW_NUMBER() vs. Index Full Scan (Min/Max)
Dec 1, 2017
5
min read
Options for Tracing Oracle dbms_stats
Options for Tracing Oracle dbms_stats
Oct 22, 2013
9
min read
No Comments Yet
Let us know what you think