-
TRIGGER TO GET SERVERERROR ON DATABASE
Continue reading →: TRIGGER TO GET SERVERERROR ON DATABASELets create a trigger that will log all the errors in the database:It is better to create this trigger under SYS or DBA user’s so that you don’t have to grant all permission if you have to grant permissions separately. ——————————————————–— DDL for Trigger AFTER_ERROR——————————————————– CREATE OR REPLACE TRIGGER “AFTER_ERROR” AFTER SERVERERROR…
-
Find index skewed, rebuild
Continue reading →: Find index skewed, rebuildFind index skewed, rebuild Summary It is important to periodically examine your indexes to determine if they have become skewed and might need to be rebuilt. When an index is skewed, parts of an index are accessed more frequently than others. As a result, disk contention may occur, creating a…
-
Which SQL are doing a lot of disk I/O
Continue reading →: Which SQL are doing a lot of disk I/OWhich SQL are doing a lot of disk I/O Which SQL are doing a lot of disk I/O SELECT * FROM (SELECT SUBSTR(sql_text,1,500) SQL, ELAPSED_TIME, CPU_TIME, disk_reads, executions, disk_reads/executions “Reads/Exec”, hash_value,address FROM V$SQLAREA WHERE ( hash_value, address ) IN ( SELECT DISTINCT HASH_VALUE, address FROM v$sql_plan WHERE DISTRIBUTION IS NOT…
-
Disk I/O
Continue reading →: Disk I/ODisk I/O Script Datafiles Disk I/O Tablespace Disk I/O Which segments have top Logical I/O & Physical I/O Which SQL are doing a lot of disk I/O
-
Which segments have top Logical I/O & Physical I/O
Continue reading →: Which segments have top Logical I/O & Physical I/OWhich segments have top Logical I/O & Physical I/O Summary Do you know which segments in your Oracle Database have the largest amount of I/O, physical and logical? This SQL helps to find out which segments are heavily accessed and helps to target tuning efforts on these segments: SELECT ROWNUM…
-
Tablespace Disk I/O
Continue reading →: Tablespace Disk I/OTablespace Disk I/O Summary The Physical design of the database reassures optimal performance for DISK I/O. Storing the datafiles in different filesystems (Disks) is a good technique to minimize disk contention for I/O. How I/O is spread per Tablespace SELECT T.NAME, SUM(Physical_READS) Physical_READS, ROUND((RATIO_TO_REPORT(SUM(Physical_READS)) OVER ())*100, 2) || ‘%’ PERC_READS,…
-
Datafiles Disk I/O
Continue reading →: Datafiles Disk I/ODatafiles Disk I/O Summary The Physical design of the database reassures optimal performance for DISK I/O. Storing the datafiles in different filesystems (Disks) is a good technique to minimize disk contention for I/O. How I/O is spread per datafile SELECT NAME, phyrds Physical_READS, ROUND((RATIO_TO_REPORT(phyrds) OVER ())*100, 2)|| ‘%’ PERC_READS, phywrts…
-
Current waiting events Summary
Continue reading →: Current waiting events SummaryCurrent waiting events Summary The first and most important script about OWI, is where current sessions waiting SELECT a.SID, b.serial#, b.status, p.spid, b.logon_time, a.event, l.NAME latch_name, a.SECONDS_IN_WAIT SEC, b.sql_hash_value, b.osuser, b.username, b.module, b.action, b.program, a.p1,a.p1raw, a.p2, a.p3, –, b.row_wait_obj#, b.row_wait_file#, b.row_wait_block#, b.row_wait_row#, ‘alter system kill session ‘ || ”” ||…
-
Db file sequential read
Continue reading →: Db file sequential readDb file sequential read Summary The db file sequential read wait event means that Oracle is waiting while doing a single-block I/O read. This is the case when reading an index. Like all wait events the columns P1, P2, P3 give us the information needed to diagnose the waiting. Tip:…
-
DELETE or CLEANUP failed export Jobs
Continue reading →: DELETE or CLEANUP failed export JobsFailed Jobs can be verified by using the following sql: sql > select owner_name,job_name,operation,job_mode,state,attached_sessions from dba_datapump_jobs; Check the state (status ) of the Jobs all the failed Jobs,they will show as not running for failed once. DROP MASTER TABLE Since the above jobs are orphaned or not running won’t…







