December 2015

Identify sessions that are blocking other sessions

Sometimes an application will be plagued by sessions that are abandoned partway through a transaction, leaving locks on rows. Other sessions may try to update/delete these locked rows and will hang while waiting for the locks to be release. Here is a simple query against the ASH view that will find any sessions that have […]

Read more →

Handy Edition Based Redefinition queries

A few queries that are useful to have on hand:   SELECT sys_context(‘userenv’,’current_edition_name’) current_edition_name from dual; ALTER SESSION SET EDITION = R_ABC; ALTER SESSION SET EDITION = ora$base; SELECT * FROM dba_editions; SELECT * FROM database_properties WHERE property_name = ‘DEFAULT_EDITION’; SELECT * FROM dba_objects_ae WHERE edition_name IS NOT NULL ORDER BY object_type,object_name; SELECT * FROM dba_editioning_views_ae ORDER BY owner; SELECT username, editions_enabled FROM dba_users ORDER BY username;

Read more →