Metadata Locking Options |
The SAS Open Metadata Interface provides the OMI_LOCK, OMI_UNLOCK, and OMI_UNLOCK_FORCE flags to lock metadata objects. The flags represent the simplest concurrency control provided by the SAS Open Metadata Architecture. Before making an update, issue a GetMetadata method call with the OMI_LOCK flag on the objects that you wish to modify. The specified object and any associated objects specified by GetMetadata flags and options are locked. Each objects' LockedBy= attribute is updated with the metadata identifier representing the caller. The objects remain locked from update by users other than the calling identity until an UpdateMetadata method is issued with the OMI_UNLOCK or OMI_UNLOCK_FORCE flags.
OMI_UNLOCK unlocks a lock held by the caller and is the recommended method of unlocking a lock. OMI_UNLOCK_FORCE unlocks a lock held by another user and is intended to be used as an emergency override mechanism. While locked, objects can be read by other users. They cannot be updated by other users until the user holding the lock completes his update.
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.
For more information, see GetMetadata and UpdateMetadata.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.