Posts by Venkatesh GK

ORA-56920: a prepare or upgrade window or an on-demand or datapump-job loading of a secondary time zone data file is in an active state

Please use the below to fix the issue.   CONN / as sysdba alter session set “_with_subquery”=materialize; alter session set “_simple_view_merging”=TRUE; set serveroutput on VAR numfail number BEGIN DBMS_DST.UPGRADE_DATABASE(:numfail, parallel…

Read More

ORA-01591: lock held by in-doubt distributed transaction 1.92.66874

Below is an example for transaction id 1.92.66874, you need to replace correct transaction id. Trying to manually commit or rollback this transaction   commit force ‘1.92.66874’; ORA-02058: no prepared…

Read More

Query to get session details for pending transactions in Oracle Database

Please get session detail for transaction 95.22.1516570 (Replace with your transaction id) select t1.sid, t1.username, t2.xidusn, t2.used_urec, t2.used_ublk from v$session t1, v$transaction t2 where t1.saddr = t2.ses_addr; and t2.XIDUSN =…

Read More

Script to collect all the required information for understanding the Concurrent Processing workload on a system

REM HEADER REM $Header: cp_analyzer.sql v1.01 MCOSTA $ REM REM MODIFICATION LOG: REM REM MCOSTA REM REM Consolidated script to diagnose the current status and footprint of Concurrent Processing on…

Read More

Query to generate Baseline Script for a SQL_ID in Oracle Database

Please use the below query. col sql_text for a60 wrap set verify off set pagesize 999 set lines 155 col username format a13 col prog format a22 col sid format…

Read More

Steps to Export and Import AWR Stats

Please find the steps to export and import AWR stats. Exporting AWR snapshot data:- ***************************** SQL> @?/rdbms/admin/awrextr.sql AWR EXTRACT **************************************************** This script will extract the AWR data for a range of snapshots into a dump file. The script…

Read More

Steps to Backup and Restore Java Classes and Privileges only in Oracle Database

The following SQL script, when run as user SYS, will generate an ordered script to recreate all the java grants, and java policies, assigned to users. It does not generate…

Read More

Steps to reformat the corrupted free blocks.

Please find the steps done below for one type of block but can be used for any block.   create table demo.wcc99(n number, c varchar2(4000)) nologging tablespace DISC pctfree 99…

Read More

OEM Fix For Agent Shows Availability Evaluation Error

Please run the below command from <Agent base>/agent_inst/bin of the agent monitoring the target host. ./emctl config agent addinternaltargets ./emctl secure agent ./emctl config agent listtargets ./emctl stop agent ./emctl secure agent…

Read More

Query to get source code in database from back end

set verify off set feedback off set lines 300 set pages 0 set heading off set space 0 column text format a79 column line noprint select DECODE(line,1,’create or replace ‘,”)||text,…

Read More