Server Error in ‘/’ Application – SharePoint 2013

Background Information
Server 2012 Standard: Front Web Server
Server 2012 R2 x 2: SQL Server2012 (Windows Clustered)
SharePoint server is being as a the primary DMS (Document Management System) since 2012. Since the roll up of the server, no windows update has ever been installed in this server.

After Maintenance of both Front end web server & both SQL server (Windows Update – roughly about 2 years worth) I restarted all servers. When trying to access the main site of the web application, I noticed the below Error message

Server Error in ‘/’ Application
Runtime Error
Description: An application error occurred on the server.
At this point, I was freaking out as I didn’t know where to look for the problem, as the above error message doesn’t give much information. After much browsing around (about 4 hours worth) I found this post in google which only shows how to correct the error message and see a proper information in the error message. so I fixed the custom error page as suggested in the link by editing the web.config file, but still SharePoint page is not up. I couldn’t access any other sub site pages either.

Troubleshooting Steps I carried out
1) I made sure all the SharePoint Services were up, and restarted it
2) I made sure all the SQL server services were up & restarted it
3) Then I began to look in the Event viewer which was flooded with error message.
Some of the error messages read like below –

SQL Database ‘SharePoint_Config’ on SQL Server instance ‘C4968397007′ not found. Additional error information from SQL Server is included below.
Cannot open database “SharePoint_Config” requested by the login. The login failed. Login failed for user ‘DC07\SQLSvc’


4) So I logged into one of the SQL Server management studio and expanded database to notice that all the database was showing “Recovery Pending Mode” DB_recovery_pendingThe reason this database issue happens is because during windows update SQL Server Service gets locked processing incoming service request. Sometime couple of restart of the server may fix this.

So I go googling again and after searching for about an 1 hour I was close to just restoring all VM’s from a previous snapshot.
The Steps I took are as below
1) from googling, found this link
2) Start SQL Server Management Studio.
3) Expand the databases.
4) Use Control+N to start a new SQL query

Use [master]
EXEC sp_resetstatus “RecoveryPendingModeDB
ALTER DATABASE “RecoveryPendingModeDB” SET EMERGENCY DBCC checkdb(‘RecoveryPendingModeDB’)
EXEC sp_resetstatus ‘RecoveryPendingModeDB

I only did it for one database and then did a restart of both SQL server at the same time. to my surprise, after the restart all database is now showing ok from the management console.
Then I try to access my SharePoint site again and wallah!! all fixed

I searched in google for hours but could find an exact solution. Hopefully this article will help someone who is having similar issue.

Leave a Reply

Your email address will not be published. Required fields are marked *