Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
DBMS_WM , 50 of 52
This procedure sets the default mode for the row-level locking in the workspace.
DBMS_WM.SetLockingON( workspace IN VARCHAR2, lockmode IN VARCHAR2 [, override IN BOOLEAN DEFAULT FALSE]);
Parameter | Description |
---|---|
workspace |
Name of the workspace for which to set the locking mode. The name is case sensitive. |
lockmode |
Locking mode. Must be
|
override |
A boolean value (
|
This procedure affects Workspace Manager locking, which occurs in addition to any standard Oracle server locking. Workspace Manager locks can be used to prevent conflicts. When a user locks a row, the corresponding row in the parent workspace is also locked. Thus, when this workspace merges with the parent at merge time, it is guaranteed that this row will not have a conflict.
Exclusive locking prevents the use of what-if scenarios in which different values for one or more columns are tested. Thus, plan any testing of scenarios when exclusive locking is not in effect.
If the override parameter value is TRUE
, locking can also be enabled and disabled at the user session level with the SetLockingON Procedure and SetLockingOFF Procedure, respectively.
There are no specific privileges associated with locking. Any session that can go to a workspace can set locking on.
All new changes by this session or a subsequent session are locked, unless the session turns locking off by executing the SetLockingOFF Procedure.
An exception is raised if any of the following occurs:
WM_ADMIN_ROLE
role or is not the owner of workspace
.
workspace
.
workspace
is a continually refreshed workspace (see the description of the isrefreshed
parameter of the CreateWorkspace Procedure procedure).
The following example sets exclusive locking on for the workspace named NEWWORKSPACE
.
EXECUTE DBMS_WM.SetWorkspaceLockModeON ('NEWWORKSPACE', 'E');
All locked rows remain locked until the workspace is merged or rolled back.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|