/* 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 alter session set max_dump_file_size=0; /* before 11g shared latch get function was named kslgetsl() in 11g - kslgetsl_w() */ col shared_latch_function new_value shared_latch_function var db_v varchar2(100); var db_comp varchar2(100); begin dbms_utility.db_version(:db_v,:db_comp); end; / select decode(sign(replace(:db_v,'.','')-110000),1,'kslgetsl_w', 'kslgetsl') shared_latch_function from dual; col laddr new_value laddr set echo on SELECT addr laddr FROM v$latch WHERE NAME='gcs partitioned table hash'; /* get latch in exclusive mode */ oradebug setmypid oradebug call &shared_latch_function 0x&laddr 1 4 5 16 host sleep 100 oradebug call kslfre 0x&laddr exit
shared_latch_X.sql
1 Comment »
RSS feed for comments on this post. TrackBack URI
[…] the number of holders. To simplify further demonstrations I wrote scripts shared_latch_S.sql and shared_latch_X.sql This scripts acquire the ‘gcs partitioned table hash’ latch in S and X mode respectively and […]
Pingback by Shared latch behaves like enqueue « Latch, mutex and beyond — November 17, 2010 @ 10:16 pm |