SharePoint Contetnt Database is not accessible due to a Single User mode

Yesterday, I tried to open the SharePoint portal but unfortunately the page can not be displayed ! Thence,

  • I checked the proxy settings in browser.
  • I made sure that all servers within farm running.
  • I checked SQL server status that running.

Finally, i found out a strange user symbol beside database name with (Single User) !!
0
I tried to expand the “WSS_Contene” database,but unfortunately I got the following error

The database is not accessible.

Database is not accessible

Cause:

The current specified database mode is a SINGLE_USER that allow only one user at a time can access the database and is generally used for maintenance actions.

Solution

  • Open SQL Management studio and login as SQL authentication with “sa” system account.
  • Open a new Query > Type the following query to list all system process ID based on specific database.
Select spid from sysprocesses p inner join sysdatabases d on p.dbid = d.dbid  
where d.name = 'database' . where database is your database name .

ex :\Select SPID from sysprocesses p inner join sysdatabases d on 
p.dbid = d.dbid  where d.name = 'WSS_Content_9005'
  • Kill all SPID listed in output of previous query.
Kill SPID

ex :\ Kill 85  where 85 is the result of the previous query .
  • After you killed all process, set the database mode to MULTI_USER.
 ALTER DATABASE 'database' SET MULTI_USER .
where database is your database name .

ex :\  ALTER DATABASE  'WSS_Content_9005'  SET MULTI_USER .

The database should be now accessible,the SharePoint portal is now working properly.

Enjoy 🙂

Advertisements

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