The SAS Open Metadata Interface provides the OMI_LOCK,
OMI_UNLOCK, and OMI_UNLOCK_FORCE flags to lock metadata objects. These
flags represent the simplest concurrency control provided by the SAS
Open Metadata Interface. Before making an update, issue a GetMetadata
method call with the OMI_LOCK flag on the object that you want to
modify. The specified object and any associated objects are locked.
Each object’s LockedBy attribute is updated with the metadata
identifier representing the caller. The object remains locked from
update by users other than the caller until a GetMetadata or UpdateMetadata
method is issued with the OMI_UNLOCK or OMI_UNLOCK_FORCE flag.
OMI_UNLOCK unlocks a
lock held by the caller. It is the recommended method of unlocking
a lock. OMI_UNLOCK_FORCE unlocks a lock held by another user. It is
to be used as an emergency override mechanism. While locked, objects
can be read by other users. They cannot be updated by other users.
The LockedBy attribute
is set and cleared automatically by the lock flags. It can be queried
to determine whether an object is locked, and who holds the lock.
The LockedBy attribute cannot be changed or cleared directly with
the UpdateMetadata method.