Monday, July 9, 2012

Lync Databases Stuck in "Restricted User" Mode After (CU) Update


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
Alter
Database <dbname> set Single_user with rollback immediate
Go
Alter
Database <dbname> set multi_user
Go
  • 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

1 comment:

  1. Thank You!
    Great help while I got stuck in the same situation doing Lync 2010 update. Cheers :-)

    ReplyDelete