Manual simulation to get latch

Source: Internet
Author: User

Manual simulation to get latch

Arbitrarily dump a latches structure file:
sql> Oradebug Dump latches 10
Ora-00074:no process has been specified
Sql> Oradebug Setmypid
Statement processed.
sql> Oradebug Dump latches 10
Statement processed.
Sql> Oradebug Tracefile_name
/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5564.trc

Find the file and find a latch address to view:
We're looking for an active checkpoint queue with an address of 0x60019d98, and the current state is free:
60019d98 Active checkpoint Queue latch level=5
Location from where latch is held:kcbk.h line:2222 ID:kcbbacq:scan active checkpoints:
Context saved from call:0
State=free [value=0] wlstate=free [value=0]
Gotten 2345 times wait, failed first 0 sleeps 0
Gotten 0 times nowait, failed:0

Verify with Oradebug:
sql> Oradebug Peek 0x60019d98 8
[060019d98, 060019da0) = 00000000 00000000
The current value of the latch is 0, which is the Free State, and I change it to 1:
Sql> Oradebug Poke 0x60019d98 2 1
Before: [060019d98, 060019d9c) = 00000000
After: [060019d98, 060019d9c) = 00000001
Dump a latches structure file again and find the above latch information:
60019d98 Active checkpoint Queue latch level=5
Location from where latch is held:kcbk.h line:2222 ID:kcbbacq:scan active checkpoints:
Context saved from call:0
state=busy [Holder orapid=1] wlstate=free [value=0]
Waiters [Orapid (Seconds since:put on list, posted, alive Check)]:
10 (30, 1402142587, 30)
Waiter Count=1
Gotten 2607 times wait, failed first 0 sleeps 0
Gotten 0 times nowait, failed:0
State of busy.

Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

Manual simulation to get latch

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.