Posts

Showing posts from August, 2023

Useful Scripts to finding Query timings from AWR report and Memory

Below query collecting data from AWR report. Copy SET LINES 155 COL execs FOR 999,999,999 COL avg_etime FOR 999,999.999 COL avg_lio FOR 999,999,999.9 COL begin_interval_time FOR a30 COL node FOR 99999 BREAK ON plan_hash_value ON startup_time SKIP 1 SELECT ss.snap_id, ss.instance_number node, begin_interval_time, sql_id, plan_hash_value, NVL(executions_delta, 0) execs, (elapsed_time_delta / DECODE(NVL(executions_delta, 0), 0, 1, executions_delta)) / 1000000 avg_etime, (buffer_gets_delta / DECODE(NVL(buffer_gets_delta, 0), 0, 1, executions_delta)) avg_lio FROM DBA_HIST_SQLSTAT S, DBA_HIST_SNAPSHOT SS WHERE ss.snap_id = S.snap_id AND ss.instance_number = S.instance_number AND sql_id = ' ' AND executions_delta > 0 ORDER BY 1, 2, 3 /  Below query use to (.sql) file Copy SET ECHO OFF SET VERIFY OFF SET FEEDBACK OFF SET HEADING ON SET TIMING OFF UNDEF sql_id PROMPT "SQL...

Frequently Using Linux Commands

How to check Port availability   lsof -i tcp:<Port_Num> Netstat -putan |grep <Port_Number> netstat -an |grep <Port_Number>   lsof -i tcp:8031  netstat -putan |grep 8031   Renaming more than one characters in VI editor   Below command is replacing the word "DEV" to TEST in source file   perl -pi -e 's/DEV/TEST/g' <File_Name>   Ex: perl -pi -e 's/DEV/TEST/g' initTEST.ora     Check the Connection issues   nslookup  <Hostname> tnsping <Hosyname>   Searching the Multiple parameters in single file   $ORACLE_HOME/OPatche/opatch lsinventory |egrep -w '23456|125679|76578'| grep "applied on"   Tar Command Tar command is using to zip and unzip the files  Zip files: tar -cvf 11.2.0.4.tar.gz 11.2.0.4/ Unzip tar -xvzf  11.2.0.4.tar.gz   Nohup command nohup command in Linux systems that keep processes running even after exiting the ...