Database Blog

Find segments with corrupted blocks

Find segments with corrupted blocks RMAN picks up logical block corruption when you use the following option  in your backup script: backup full check logical The following procedure helps to…

Read More

Moving Data Files Between Oracle ASM Disk Groups Using RMAN

1. Start RMAN and connect to the target database. $ rman target / connected to target database: ORCL (DBID=1217369048) 2. Generate a report that shows the names of the data…

Read More

Fix Pending Distributed Transactions

Here is how to fix Pending Distributed Transactions SELECT * FROM DBA_2PC_PENDING   COUNT(*)————–    1 select max(fail_time) from dba_2pc_pending; MAX(FAIL_————–03-DEC-16 select ‘exec dbms_transaction.purge_lost_db_entry(”’||local_tran_id||”’ )’ , ‘commit;’ fromdba_2pc_pending ‘EXECDBMS_TRANSACTION.PURGE_LOST_DB_ENTRY(”’||LOCAL_TRAN_ID||”’)”COMMIT;’ exec dbms_transaction.purge_lost_db_entry(‘15.41.373682’…

Read More

Unable to Mount ASM DiskGroup

Your ASM disk group will be vanished for some reasons if you try to mount it you will get an error some thing like the below SQL> alter diskgroup DATA1…

Read More

Applying WebLogic 10.3.6.0 PSU and patch conflicts!

Applying latest PSU ?Patch Set Update? for latest bug fixes and security vulnerabilities, (PSU October 2016? Patch ID: K25M Patch No: 23743997 To find the relevant patch number.: 1. Checked…

Read More

Steps to find values populated in DBA_TAB_MODIFICATIONS

Goal : The goal is to explain why the view DBA_TAB_MODIFICATIONS  does sometimes have no values even when the parameter STATISTICS_LEVEL  is set to TYPICAL and  the specific schema has been…

Read More

Shell Script to Run RMAN Backup in Background with nohup

Please find the below steps. Step 1. Prepare a RMAN command file vi bkup.cmd run { allocate channel ch1 device type disk;allocate channel ch2 device type disk; sql ‘ALTER SYSTEM…

Read More

Steps to Purge a Distributed Transaction from a Database. (ORA-24756: transaction does not exist tips)

Please follow the below steps. If the remote database cannot be accessed, a failed distributed transaction cannot be committed or rolled back and so must be purged from the list…

Read More

Query to find blocking session details for the past by using time interval

Please find the queries below. 1) The below one will show all the sessions. set lines 170set pages 10000col event format a40col sample_time format a40select to_char(sample_time,’DD-MON-YY HH24:MI:SS’),SESSION_ID,SESSION_SERIAL#,SQL_ID,BLOCKING_SESSION,BLOCKING_SESSION_SERIAL#,BLOCKING_SESSION_STATUS,EVENT from dba_hist_active_sess_history where…

Read More

Query to get bind variable, eplan using sql_id and eplan using sql text with table format

Please find the queries below. 1)  BIND VARIABLE USING SQL_ID     ============================= column name format a30column datatype_string format a30column value_string format a30 set lines 120 pages 200accept v_sql_id prompt ‘Enter…

Read More