Home > Deployment, SharePoint 2010 > How to fix “The database is in single-user mode, and a user is currently connected to it.”

How to fix “The database is in single-user mode, and a user is currently connected to it.”

Recently, when I running the buildscript for a SharePoint. I get the following error message:

[exec] Remove-SPSite : Cannot open database “WSS_Content_YBBEST_AAA_2013′ requested by the login. The login failed.

[exec] Login failed for user ‘YBBEST\administrator’.

Then I went to the SQL Management studio, the database is in Single user mode, not sure how it ends up in that state. When I try to delete the database then I got the following errors:

Changes to the state or options of database ‘WSS_Content_YBBEST_AAA_2013′ cannot be made at this time. The database is in single-user mode, and a user is currently connected to it.

Guess, how to fix the issue?

Restart your SQL Server to fix the problem.

You can restart SQL Server by right click the server in your Management studio and choose restart.

About these ads
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 169 other followers

%d bloggers like this: