MicroStrategy ONE
Project and configuration locking
Command Manager does not automatically lock a project or configuration when it executes statements. Thus, any time you alter a project metadata or Intelligence Server configuration with a Command Manager script, there is the possibility that another user could alter the metadata or configuration at the same time. This can cause metadata or configuration inconsistencies, and in the worst case may require you to reinstall Intelligence Server or restore your project from a backup.
To avoid these inconsistencies, use the LOCK PROJECT or LOCK CONFIGURATION statements in any Command Manager scripts that make changes to a project or server configuration. These statements place a lock on the metadata or configuration. A metadata lock prevents other MicroStrategy users from modifying any objects in the project in MicroStrategy Developer or MicroStrategy Web. A configuration lock prevents other MicroStrategy users from modifying any configuration objects, such as users or groups, in the project source.
When other users attempt to open an object in a locked project or configuration, they see a message that informs them that the project or configuration is locked because another user is modifying it. Users can then choose to open the object in read-only mode or view more details about the lock.
There are two kinds of locks in Command Manager:
-
Transient locks are automatically released after disconnecting.
-
Permanent locks are only released after an UNLOCK command, or when the project is manually unlocked. Permanent locks are indicated by the word PERMANENT in the LOCK command.
For detailed information about locking and unlocking projects or configurations, see the MicroStrategy Developer Help (formerly the MicroStrategy Desktop Help).
If you lock a project or configuration in a Command Manager script, make sure you release the lock at the end of the script with the UNLOCK PROJECT or UNLOCK CONFIGURATION statement. For more information about the metadata lock management statements, see Metadata lock management.