Article Details
Id: | 18887 |
Product: | finPOWER Connect |
Type: | FIX |
Version: | 3.04.03 |
Opened: | 19/11/2021 |
Closed: | 15/12/2021 |
Released: | 01/02/2022 |
Job: | J027822 |
SQL Server; improved error message when attempting to open a Database in Exclusive mode
Opening a Database in Exclusive mode in SQL Server follows this sequence of events.
- Open the Database
- Do normal checks, e.g. that it is the correct version of finPOWER Connect.
- Check for special "Database" lock in the "ISLocks" table.
- If one exists, another User has the Database already open in Exclusive mode - so fail.
- Get a list of Database Users.
- If there are other Users in the Database then fail - as it can't be in Exclusive mode.
- Place a special "Database" lock in the "ISLocks" table.
- This signifies that the User now has the Database is Exclusive mode.
However, in SQL Server you require the "VIEW SERVER STATE" permission to retrieve a list of Users.
If you don't have this permission the operation fails with a message like:
Failed to open Database '[Name]'.
Failed to open database in exclusive mode.
Failed to get a list of Users from Database '[Name]'.
You require 'VIEW SERVER STATE' Server Permission to complete this operation.
This message has been improved by adding the extra detail "The Database cannot be opened in Exclusive mode without first checking if other Users are already using the Database.".
NOTE: This is not the same as opening the database in SINGLE_USER mode.