Posts by Venkatesh GK

Query to get inactive count as per machine name and sql id

Please use the below query.     SELECT count(prev_sql_id),prev_sql_id,sql_text FROM v$session LEFT OUTER JOIN v$sql ON v$session.prev_sql_id = v$sql.sql_id WHERE status=’INACTIVE’ and machine like ‘%servername%’ HAVING COUNT(prev_sql_id)>5 GROUP BY prev_sql_id,sql_text…

Read More

ORA-07445: exception encountered: core dump [kggchk()+52] [SIGSEGV] [ADDR:0x444C5E6E0] [PC:0x117171614] [Application data integrity precise] [3]

Please find the below steps to resolve the same. ADI [Application Data Integrity] memory feature is enabled by default in Solaris SPARC Download and apply Patch 35464935. OR Set the…

Read More

Query to get CPU and Memory usage from OEM database

Please use the below query for a period.   SELECT to_char(rollup_timestamp,’DD-MON-YY HH24′) “Date”, average “CPU Usage %” FROM sysman.MGMT\$METRIC_HOURLY WHERE target_name like ‘%servername%’ AND metric_name = ‘Load’ AND metric_column =…

Read More

Script to create trace at database schema level by using trigger

Please create the below and disable or drop the trigger once completed.   create or replace trigger set_trace after logon on database begin if user not in (‘SYS’,’SYSTEM’,’SYSMAN’,’OLAPSYS’) then execute…

Read More

Script to create VMSTAT and to collect Metrix in a database

Please use the below.   CREATE TABLE DBA.STATS$TOTALUSERS ( MEASURED_DATE DATE, TOTAL_USERS NUMBER, ACTIVE_USERS NUMBER ) TABLESPACE USERS PCTUSED 0 PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 64K…

Read More

Query to get the user details from Cluster database

Please use the below query. set line size 750 pages 9999 col box for a30 col username for a30 col spid for a30 col program for a30 col os_user for…

Read More

Query to get the baseline for an sql id

Please use 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 Uninstall Apex in Database

Please follow the below steps col COMP_ID for a15 col COMP_NAME for a45 col STATUS for a20 set lines 100 pages 100 select COMP_ID,COMP_NAME,STATUS from dba_registry; COMP_ID COMP_NAME STATUS —————…

Read More

Stesp to Add/Resize Redolog files

Steps to Resize the Online Redo Logfiles >sqlplus /nolog SQL> connect / as sysdba SQL> select name,open_mode from v$database; NAME OPEN_MODE ——— ——————– PROD READ WRITE Please check the below…

Read More

Script to compare two initoras.sh file

Please use the below script.   #!/bin/ksh file1=$1 file2=$2 for parameter in `cat $file1 | grep = | awk ‘{print $1}’ | grep -v ‘#’` do value1=`grep ^$parameter $file1 |…

Read More