Latch, mutex and beyond

list_shared_latches.sql

/*
     This file is part of demos for "Contemporary Latch Internals" seminar v.24.08.2010
     Copyright:   (c) Andrey S. Nikolaev (Andrey.Nikolaev@rdtex.ru) RDTEX 

http://AndreyNikolaev.wordpress.com

*/
connect / as sysdba
set pagesize 0
/* 
   The script will generate many of traces and may consume a lot of disk space.
   To suppress DIAG dumps in 11g set "_diag_daemon"=false 
*/
drop table shared_latches;
create table shared_latches(
version varchar2(50),	/* Oracle version */
latch# number,
name   varchar2(200),
shared char(1)		/* if 'Y' then latch is shared  */
);

spool list_shared_latches.sh
select 'sqlplus /nolog @is_latch_shared 0x'||addr||' '||latch#||' "'||translate(name,'''',' ')||'"' 
   from v$latch_parent;
spool off
!sh list_shared_latches.sh
exit

1 Comment »

  1. [...] list_shared_latches.sql. The script creates the table shared_latches to store results and generates shell script list_shared_latches.sh to callĀ  is_latch_shared.sql script for each latch in v$latch_parent [...]

    Pingback by Shared latches by Oracle version « Latch, mutex and beyond — November 27, 2010 @ 11:28 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 65 other followers

%d bloggers like this: