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, it is possible 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 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, a message 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.
Command Manager has two kinds of locks:
- Transient locks are automatically released after disconnecting.
- Permanent locks are released only after an UNLOCK command or when the project is manually unlocked. Permanent locks are indicated by the word PERMANENT in the LOCK command.
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.