Get object id from rowid:
===========================
Some time we have rowid casuing issue, but we dont know for which object you can find object id from the below query.
Select DBMS_ROWID.rowid_object('give your row id here') from dual;
The content includes guides, troubleshooting tips, and best practices for managing database environments, with an emphasis on Oracle and PostgreSQL systems. You can read the full analysis at Anuroop Challa's DBA Blog.
Get object id from rowid:
===========================
Some time we have rowid casuing issue, but we dont know for which object you can find object id from the below query.
Select DBMS_ROWID.rowid_object('give your row id here') from dual;
Get init trans value of Object:
=========================
select table_name, INI_TRANS from dba_tables where table_name = 'TABLE_NAME';
SELECT table_name, index_name, status, ini_trans FROM DBA_INDEXES
INITTRANS value set double for index than object, like below ex:
ALTER TABLE TABLE_NAME MOVE INITRANS 10;
ALTER INDEX TABLE_NAME_PK REBUILD INITRANS 20;
ALTER INDEX TABLE_NAME_I1 REBUILD INITRANS 20;
Get DDL from database:
====================
SQL>set lines 120
SQL>set pages 99999
SQL>set long 1000000
SQL> SELECT DBMS_METADATA.GET_DDL('<object_type','<object_name>','<object owner>') FROM DUAL;
select DBMS_METADATA.GET_DDL(object_type, object_name) from user_objects where object_type = 'TABLE' and object_name = 'MY_TABLE'
Try below 2 querys for blocking session detail:
For which SQL is currently waiting on:
==================================
select
sid,
sql_text
from
v$session s,
v$sql q
where
sid in
(select
sid
from
v$session
where
state in ('WAITING')
and
wait_class != 'Idle'
and
event='enq: TX - row lock contention'
and
(q.sql_id = s.sql_id or q.sql_id = s.prev_sql_id));
The blocking session is:
================================
select
blocking_session,
sid, serial#,
wait_class,
seconds_in_wait
from
v$session
where
blocking_session is not NULL
order by
blocking_session;
Query for checking archive log at RDS.
===================================
select * from table (rdsadmin.rds_file_util.listdir(p_directory => 'ARCHIVELOG_DIR')) order by filename;
select min(filename) from table (rdsadmin.rds_file_util.listdir(p_directory => 'ARCHIVELOG_DIR')) where filename like 'archive_name%';
Oracle Clusterware crsctl commands: # Check cluster status crsctl check crs crsctl check cluster # Cluster resources crsctl status reso...