Oracle7 Parallel Server Concepts and Administrator's Guide | ![]() Library |
![]() Product |
![]() Contents |
![]() Index |
See Also: "Ensuring DLM Capacity for All Resources & Locks" for details on how to calculate the number of non-PCM resources and locks which your DLM must support.
Figure 10 - 1. Oracle Locking Mechanisms: Non-PCM Locks
Whereas PCM locks are static (you allocate them when you design your application), non-PCM locks are very dynamic. Their number and corresponding space requirements will change as your system's initialization parameter values change.
See Also: Appendix E, "Enqueue and Lock Names," for descriptions of all non-PCM locks.
When an instance attempts to mount the database, a table lock is used to ensure that all participating instances either have DML_LOCKS = 0 or DML_LOCKS != 0. If they do not, than error ORA-61 is returned and the mount attempt fails. Table locks are acquired during the execution of a transaction when referencing a table with a DML statement so that the object is not dropped or altered during the execution of the transaction. This occurs if and only if the DML_LOCKS parameter is non-zero.
You can also selectively turn table locks on or off for a particular table, using the statement
ALTER TABLE tablename DISABLE|ENABLE TABLE LOCK
See Also: "Minimizing Table Locks to Optimize Performance" to consider disabling table locks for improved performance.
The System Change Number (SCN) is used to serialize time within a single instance, and across all instances. This lock resource caches the current value of the SCN. The value is incremented in response to many database events, but most notably COMMIT WORK. Access to the SCN lock value to get and store the SCN is batched on most cluster implementations. In this way, every process that needs a new SCN gets one and stores a new value back on one instance, before the SCN lock is released. Then the SCN lock may be granted to another instance. Processes get the SC lock once and then use conversion operations to manipulate the lock value.
The SCN implementation can differ from platform to platform. Commonly, on the parallel server the DLM maintains the SCN in a lock value block of the SC resource. A process will get an instance lock on the SCN resource in exclusive mode, read the lock value block, increment the SCN, downgrade the instance lock, and write the lock value block.
Note: In V6, these locks are known as parse or DDL locks except that in V6 these locks are held for the duration of the cursor (that is, until the cursor is closed).
Creating a new table, for example, causes the meta-data of that table to be cached in the data dictionary. If a table is dropped, the meta-data needs to be removed from the data dictionary cache. To synchronize access to the data dictionary cache, latches are used in exclusive mode and in single shared mode. Instance locks are used in multiple shared (parallel) mode.
In the case of parallel server, the data dictionary cache on all nodes may contain the meta-data of a table that gets dropped on one instance. the meta-data for this table needs to be flushed from the data dictionary cache of every instance. This is perforformed and synchronized by instance locks.
In Oracle Parallel Server single shared mode, this lock is held in shared mode. Another instance can successfully mount the same database in shared mode. In OPS exclusive mode, however, another instance will not able to get the lock.
![]() ![]() Prev Next |
![]() Copyright © 1996 Oracle Corporation. All Rights Reserved. |
![]() Library |
![]() Product |
![]() Contents |
![]() Index |