SharePoint 2013 App Details Page Error

Out of no where, the app details page started throwing out error for all apps.


ULS log entries

System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object 'prc_CountAppInstanceData', database 'UsageAndHealth_Logging_DB', schema 'dbo'.     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)     at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)     at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()     at System.Data.SqlClient.SqlDataReader.get_MetaData()     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)     at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)     at System.Data.SqlClient.SqlCommand.ExecuteScalar()     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteScalar(SqlCommand command)  ClientConnectionId:d07b2e5b-1fb9-4872-83e9-4c5665bd2080


6/9/14 3:31 PM w3wp.exe (0x1CB4) 0x1B2C SharePoint Foundation Database 5214 Critical Insufficient SQL database permissions for user 'Name: NT AUTHORITY\IUSR SID: S-1-5-17 ImpersonationLevel: Impersonation' in database 'UsageAndHealth_Logging_DB' on SQL Server instance 'XXXXXXXXXXXX'. Additional error information from SQL Server is included below.  The EXECUTE permission was denied on the object 'prc_CountAppInstanceData', database 'UsageAndHealth_Logging_DB', schema 'dbo'.


With some research, I found this blog describing the same issue,
http://www.sharepointfire.com/MyBlog/2014/06/error-when-opening-details-view-for-sharepoint-2013-apps.

Since the errors all started happening just recently (don't know the exact date it started failing because I haven't check this page for a long long time).  But I think it started failing after some update (i.e. SP1) is installed to the environment.  Maybe some updated corrupted the database.

Anyway, I follow the blog and use the following Powershell command to create new database for Usage and Health Logging Application Service

Get-SPUsageApplication | Set-SPUsageApplication -DatabaseServer “********” -DatabaseName “WSS_UsageApplication2″

Comments

Unknown said…
For anyone who runs into a similar problem I was able to get around this error by reviewing the ULS logs that shows which database is inaccessible. The user on the application pool assigned for mysites requires execution to the SharePoint SQL database indicated in the ULS logs (read/write would work). Once the permission is granted on the database the details tab should work. - Dominic Llamas

Popular posts from this blog

SharePoint 2013 - Working with Display Template for Content Search Web Part

Add spell check dictionary in SharePoint 2010, SharePoint 2013, and Office 365