Clearing locks on a database (Model Explorer)
Databases are locked while you are working on them so that other users cannot modify them at the same time. Databases can also become locked if Modeler crashes while you are working.
When you click Clear All Locks or Clear Principal Locks, Modeler clears the following locks from its database:
• Row locks
• Context locks
• SQL transactional locks
While executing the Clear All Locks or Clear Principal Locks option, if any models are open, some SQL Transactional Locks do not clear. This is because when a model is open, a database link exists between the model and the SQL database even if the model is not in use. The number of open models equals the number of SQL Transactional locks, which are cleared once you close the models.
Use one of the following applications / tools to clear locks on a database:
• Model Explorer
• PTC Modeler
• SQL Server Administrator or the Model Management API
• ScfUtils
Clear All Locks on a database:
Before clearing database locks, ensure that no one else is using the database.
|
You must be a Modeler System Administrator, Modeler Database Administrator or Database Owner (dbo) to clear all locks on a database.
|
To clear all locks on a database, right-click on the database, and then select > . All locks on the database are cleared.
Clear Principal Locks on a database:
Administrators can clear database locks for specific users.
|
You must be a Modeler System Administrator, Modeler Database Administrator and Database Owner (dbo) to clear principal locks on a database.
|
1. Right-click on the database, and then select > .
2. In the user selection dialog, enter a user name, then click OK.
3. The locks are cleared.
Clearing the current user’s locks on a database
Users with write access on a database can clear their own locks.
• Right-click on the database and select > . The current user’s locks are now cleared.