Process of obtaining the memory lock in the shared pool through hard parsing of OracleOCP
1. Obtain the library cache Latch.
(1) The text of the SQL statement is not found in the name handle of the parent cursor: select * from gyj_t1 where id = 1;
2. Release library cache Latch
3. Obtain the shared pool Latch.
5. Obtain the library cache Latch again (oracle 11g: library cache mutex)
7. Release library cache Latch (oracle 11g: library cache mutex)
8. Get library cache lock ---- protect the name handle of the parent cursor (SQL statement text, address of the parent cursor H0)
9. Release the library cache lock Latch
10. Obtain the library cache Pin Latch.
12. Release the library cache Pin Latch (oracle 11g: cursor mutex)
13. Get library cache lock Latch
14. Get library cache lock ---- protect the sub-game subject name (the H0 address of the sub-cursor)
15. Release library cache lock Latch
16. Obtain the library cache Pin Latch
18. Release the library cache Pin Latch
19. Obtain the library cache Pin Latch
21. Release the library cache Pin Latch