In a few cases, I've seen where the Lync 2010 back-end databases seem to get "stuck" in "Restricted User" mode. When the databases get thrown into "Restricted User" mode, the database becomes inaccessible and therefore many of the Lync features become unavailable. In my experience, this usually occurs during a failed run of the database update required for Lync Cumulative Updates (CU). As part of the update, it is important to stop the Lync services using the Stop-CsWindowsService cmdlet on the Front End where you are running the database update command. In environments with larger pools, it is also a good idea to stop Front End services on all servers in the pool, as I have seen "deadlocks" and other strange issues when updating the Lync back-end while multiple servers continue to access it.
The following steps will help you bring the databases back online in multi-user mode:
- Run Stop-CsWindowsService in Lync Management Shell (with elevated privileges) on each Front End
- Run net stop w3svc on each Front End
- Run the following query against the affected databases in SQL Management Studio
Database <dbname> set Single_user with rollback immediate
Database <dbname> set multi_user
- The databases should now be back in "multi-user mode"
- Re-run the database update command and ensure it completes successfully
- Run net start w3svc on each Front End
- Run Start-CsWindowsService in Lync Management Shell (with elevated privileges) on each Front End