Query to find the blocking session in time interval.
Please use the below query to get the output.set lines 170set pages 10000col event format a40col sample_time format a40select to_char(sample_time,'DD-MON-YY...
View ArticleQuery to find out the sql which used high CPU.
Please use the below.set lines 500;set pages 500;set long 1000000;SELECT X.SQL_ID, X.CPU_TIME, X.EXECUTIONS, T.SQL_TEXTFROM DBA_HIST_SQLTEXT T, ( SELECT S.SQL_ID SQL_ID,...
View ArticleArticle 2
\ Query to check the object timeout in the database. Query--------select /*+ ordered */ w1.sid waiting_session,h1.sid holding_session,w.kgllktype...
View ArticleArticle 1
Query to check Stale statistics---Using Anonymous PL/SQL blockSQL> SET SERVEROUTPUT ON DECLAREObjList...
View ArticleArticle 0
ADOP patch cycle is point to PROD. Adop patch cycle pointing to PROD host from UAT instance.Enter the APPS password:Enter the SYSTEM password:Enter the...
View ArticleWindows perl script for Oracle Home
#!/usr/local/bin/perluse Win32::Registry;usage() if $#ARGV == -1;my $Reg = "SOFTWARE\\Oracle\\ALL_HOMES";my ($hakey, @key_list, $key);$HKEY_LOCAL_MACHINE->Open($Reg,$hakey)|| die $!;$hakey...
View Articlealert_log_perl
#!/usr/local/bin/perl -w# Description : This is the program to analyze the alert log# file and print out diagnostics.format top = LOG SWITCH REPORT...
View ArticleOracle alert log monitor
#!/usr/local/bin/perl -w# trlogmon.p - Oracle alert log monitor=head1 NAMEtrlogmon - Oracle alert log monitor=head1 SYNOPSIStrlogmon.p [-sleep <seconds>]=head1 DESCRIPTIONMonitors the Oracle...
View ArticleOracle Log Switch Analyzer
#!/usr/bin/perl -w## Here's a little tool I put together to give you an idea of how often# log switches are occurring on a database.## This helps to pinpoint times of high activity.## e.g.## lsa...
View ArticleTNS_NAME_PERL
#! /usr/local/bin/perl# ----------------------------------------------------------------------------# Read an Oracle TNSNAMES.ORA file and load the definitions into a list# of Oracle Name Servers....
View ArticleCloninig scripts
#!/bin/ksh## Script to auto clone DOYENSYS RMANDuplicate /bin/mailx -s "RPT:-DOYEN CLONING PROCESS Started at :-`date` " $NOTIFY_LIST...
View ArticleASMCMD copy command fails with ORA 15046
Error:ORA-15046: ASM file name '+DGEXTBK/prod/datafile/tbsext.256.628847401' is not in single-file creation formASMCMD> cp +DGEXT/orcl/datafile/tbsext.256.628847401...
View ArticleRemoving an instance and database binaries in RAC setup
Remove RAC Database Instance(s)From RAC1, $dbca select Instance_management->delete_instance->select database(prod) give sys/manager-[oracle@rac1 ~]$ srvctl...
View ArticleRemoving GRID binaries in RAC environment
Removing Clusterware binaries(GRID_HOME) from RAC3Disable the Clusterware on "rac3" as root[root@rac3 ~]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force Delete "rac3" node from...
View ArticleTo restore a failed patch in opatch apply
Restoring Oracle HomesEvery time you apply a patch, you make changes to your inventory. Sometimes that change may corrupt the inventory. You can use the restore.sh or restore.bat script that comes with...
View ArticleNo need of ocm.rsp file for Grid Patching
OPatch 12c: emocmrsp missing from OPatch/ocm/binSo far while applying PSU or one off patches, we use to pass -ocmrf parameter. I could not think of a scenario where we are going to expose database...
View ArticleManaging tracefiles using ADRCI
Managing and purging tracefiles:Now to the management of tracefiles. You may notice that 11g creates lots of tracefiles that need to be purged from time to time. In fact, this is done automatically,...
View ArticleScript to get the bind Variable for a given sql statement
SETPAUSEONSETPAUSE'Press Return to Continue'SETPAGESIZE60SETLINESIZE300COLUMNsql_textFORMATA120COLUMNsql_idFORMATA13COLUMNbind_nameFORMATA10COLUMNbind_valueFORMATA26SELECTsql_id,t.sql_textsql_text,...
View ArticleSteps to create trigger to trace a user session
CREATEORREPLACETRIGGERUSER_TRACE_TRGAFTERLOGONONDATABASEBEGINIFUSER = '&USER_ID'THENexecuteimmediate'alter session set events ''10046 trace name context forever, level...
View ArticleScript to get the details about Index Fragmentation
ACCEPTMySchemaPROMPT'Enter schema to be analysed:...
View Article