Posts

Showing posts from January, 2025

Rman Information

 col "Input size" format a14 col "output size" format a14 col "time_taken_display" format a10 col "output/sec" format a14 set pages 1000 col cf for 9,999 col df for 9,999 col elapsed_seconds heading "ELAPSED|SECONDS" col i0 for 9,999 col i1 for 9,999 col l for 9,999 col output_mbytes for 9,999,999 heading "OUTPUT|MBYTES" col session_recid for 999999 heading "SESSION|RECID" col session_stamp for 99999999999 heading "SESSION|STAMP" col status for a20 trunc col time_taken_display for a10 heading "TIME|TAKEN" col output_instance for 9999 heading "OUT|INST" select * from( select   J.DB_NAME,j.session_recid, j.session_stamp, j.session_key,   j.time_taken_display, to_char(j.start_time, 'yyyy-mm-dd hh24:mi:ss') start_time,   x.cf, x.df, x.i0, x.i1, x.l,    j.input_bytes_display as "Input Size", j.output_bytes_display "Output Size", j.output_bytes_per_sec_display as ...

Tanel event history

-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. -- this script uses "ASH math" by John Beresniewicz, Graham Wood and Uri Shaft -- for estimating the event counts (and average durations): --   https://www.slideshare.net/jberesni/ash-architecture-and-advanced-usage-rmoug2014-36611678 COL evh_event HEAD "Wait Event" for A50 TRUNCATE COL evh_graph HEAD "Estimated|Time Graph" JUST CENTER FOR A12 COL pct_evt_time HEAD "% Event|Time" FOR 990.9 COL evh_est_total_sec HEAD "Estimated|Total Sec" FOR 9,999,990.9 COL evh_millisec HEAD "Wait time|bucket ms+" FOR A15 JUST RIGHT COL evh_sample_count HEAD "Num ASH|Samples" COL evh_est_event_count HEAD "Estimated|Total Waits" FOR 999,999,990.9 BREAK ON evh_event SKIP 1 SELECT     e.evh_event   , e.evh_millisec   , e.evh_sample_count   , e.evh_est_event_count   , e.evh_est_total_sec   , ROUND ( 100 * RATIO_TO_REPORT(evh_est_total...

find_all_privs.sql

 -- ----------------------------------------------------------------------------- --                 WWW.PETEFINNIGAN.COM LIMITED -- ----------------------------------------------------------------------------- -- Script Name : find_all_privs.sql -- Author      : Pete Finnigan -- Date        : June 2003 -- ----------------------------------------------------------------------------- -- Description : Use this script to find which privileges have been granted to a --               particular user. This scripts lists ROLES, SYSTEM privileges --               and object privileges granted to a user. If a ROLE is found --               then it is checked recursively. -- --               The output can be directed to either the screen via dbms_output -...

devent_hist.sql and event_hist.sql

  -- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. -------------------------------------------------------------------------------------------------- -- -- File name:   devent_hist.sql -- Purpose:     Display wait event duration histogram from DBA_HIST_ACTIVE_SESS_HISTORY --               -- Author:      Tanel Poder -- Copyright:   (c) http://blog.tanelpoder.com | @tanelpoder --               -- Usage:        --  @ash/devent_hist file 1=1 sysdate-1 sysdate --  @ash/devent_hist file 1=1 "TIMESTAMP'2014-06-05 09:30:00'" "TIMESTAMP'2014-06-05 09:35:00'" -- -- Other:        -- this script uses "ASH math" by John Beresniewicz, Graham Wood and Uri Shaft -- for estimating the ev...

tanel podar asqlmon

@asqlmon sqlid % sysdate-1/24/12 sysdate ( 5 min )    -- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. ------------------------------------------------------------------------------------------------------------------------ -- -- File name:   asqlmon.sql (v1.3) -- -- Purpose:     Report SQL-monitoring-style drill-down into where in an execution plan the execution time is spent -- -- Author:      Tanel Poder -- -- Copyright:   (c) http://blog.tanelpoder.com - All rights reserved. -- -- Disclaimer:  This script is provided "as is", no warranties nor guarantees are --              made. Use at your own risk :) --               -- Usage:       @asqlmon <sqlid> <child#> <from_time> ...

Tanel Poder dash_wait_chains.sql

 -- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. -------------------------------------------------------------------------------- -- -- File name:   dash_wait_chains.sql (v0.8) -- Purpose:     Display ASH wait chains (multi-session wait signature, a session --              waiting for another session etc.) --               -- Author:      Tanel Poder -- Copyright:   (c) https://tanelpoder.com --               -- Usage:        --     @dash_wait_chains <grouping_cols> <filters> <fromtime> <totime> -- -- Example: --     @dash_wait_chains username||':'||program2||event2 session_type='FOREGROUND' sysdate-1 sysdate --...

Tanel Poder ash_wait_chains.sql

  @ash_wait_chains event2 sql_id='sssss' "timestamp '2013-11-04 00:00:00'"   "timestamp '2013-11-04 03:00:00'"  @ash_wait_chain.sql event2|program2|sql_opname 1=1 ' "timestamp '2013-11-04 00:00:00'"   "timestamp '2013-11-04 03:00:00'"  -- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. -------------------------------------------------------------------------------- -- -- File name:   ash_wait_chains.sql (v0.6 BETA) -- Purpose:     Display ASH wait chains (multi-session wait signature, a session --              waiting for another session etc.) --               -- Author:      Tanel Poder -- Copyright:   (c) http://blog.tanelpoder.com --               -- Usag...