System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission - User Profile Issue




Another Database Level Challenge I faced with the User Profile My Site Host.

Once I have configured entire SharePoint 2019 Farm and User Profile Service, While Loading My Site Site Collection I was getting below Error.

as ULS log Explained detail Error was as follows

System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object 'profile_GetUserProfileData', database profileDB, schema 'upa'.   
 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, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)   
 at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)   
 at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)   
 at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)   
 at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)   
 at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)   
 at Microsoft.Office.Server.Data.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)  ClientConnectionId:833f9396-d1f4-45cf-ac28-cbd4ef56e274  Error Number:229,State:5,Class:14

After Few minutes of investigation I was able to find out issue was with the Permission of the My Site host Web Application, Application Pool Account


Resolution

Provide SPDataAccess Permission to the Web Application App Pool Account on User Profile Service Databases.

Watch the Video 

 

Popular posts from this blog

How to Create Host Header to SharePoint Web Application

How to add PDF Icon in SharePoint