About
Internal locks are higher-level, more complex mechanisms than latches and mutexes and serve various purposes.
Articles Related
Type
The database uses the following types of internal locks:
Dictionary cache locks
These locks are of very short duration and are held on entries in dictionary caches while the entries are being modified or used. They guarantee that statements being parsed do not see inconsistent object definitions. Dictionary cache locks can be shared or exclusive. Shared locks are released when the parse is complete, whereas exclusive locks are released when the DDL operation is complete.
File and log management locks
These locks protect various files.
For example:
- an internal lock protects the control file so that only one process at a time can change it.
- Another lock coordinates the use and archiving of the online redo log files.
Because file and log locks indicate the status of files, these locks are necessarily held for a long time.
Tablespace and undo segment locks
These locks protect tablespaces and undo segments.
For example:
- all instances accessing a database must agree on whether a tablespace is online or offline.
- Undo segments are locked so that only one database instance can write to a segment.