Sorry, something went wrong. There was an exception in the Database. Please retry your operation and if the problem persists, contact an administrator

Instantly Solved: “Sorry, something went wrong. There was an exception in the Database” (SharePoint Server Error) – SharePoint 2016/2019

No comments

Loading

How to fix  “Sorry, something went wrong. There was an exception in the Database. Please retry your operation and if the problem persists, contact an administrator” in SharePoint 2016 search.

Issue Descriptions: “Sorry, something went wrong. There was an exception in the Database” (SharePoint Server Error)

All of a sudden, our SharePoint 2016 search is not working. From the browser getting the below error:

Sorry, something went wrong. There was an exception in the Database. Please retry your operation and if the problem persists, contact an administrator
Sorry, something went wrong. There was an exception in the Database. Please retry your operation and if the problem persists, contact an administrator

ULS log report from front end server:

SearchServiceApplicationProxy::IsUrlMappingCachedWithHash--Error occured: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: There was an exception in the Database. Please retry your operation and if the problem presists, contact an administrator. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: Microsoft.Office.Server.Search.Query.Pipeline.SearchObjectDatabaseException: There was an exception in the Database. Please retry your operation and if the problem presists, contact an administrator.
at Microsoft.Office.Server.Search.Query.Pipeline.QueryPipelineErrorHandler.TranslateSqlException(SqlException ex)
at Microsoft.Office.Server.Search.Query.UrlMapping.UrlMappingDatabaseManager.GetUrlMap(Tuple`3 key)
at Microsoft.Office.Server.Search.Administration.SearchServiceApplication.IsUrlMappingCachedInternal(Guid subscriptionId, SPUrlZone zone, String siteCollectionHash)
at Microsoft.Office.Server.Search.Administration.SearchServiceApplication.IsUrlMappingCachedWithHash(Guid subscriptionId, SPUrlZone zone, String siteCollectionHash)
at SyncInvokeIsUrlMappingCachedWithHash(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs,...).

ULS log report from application with search server:

System.Data.SqlClient.SqlException (0x80131904): Procedure or function proc_MSS_GetUrlMapping has too many arguments specified.
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:92965ffb-2fb0-4b24-8915-6d20c50568a1  Error Number:8144,State:2,Class:16

Analysis (solution): “Sorry, something went wrong. There was an exception in the Database” (SharePoint Server Error)

Run the SharePoint Configuration wizard in the Application with the search server successfully, then the search starts working as normal.

Notes:

1. To be on the safer side, before running the SharePoint Configuration wizard we must take the following backups in the server:

  • Take server snapshots or image backups of all servers(including the SQL server) on the farm.
  • Take all service application database backups.
  • Take all content database backup.
  • Take the SharePoint_Config database backup.

2. Need to remove the “WSS_UsageApplication” database from the availability group:
If you have an availability group in place in the SQL, we need to remove the “WSS_UsageApplication” database (logging database) from the availability group otherwise while running the SharePoint configuration wizard will get an error and will not be able to complete the wizard running successfully. And after successfully running the wizard we need to add back the “WSS_UsageApplication” database back to the availability group.

Summary: “Sorry, something went wrong. There was an exception in the Database” (SharePoint Server Error)

Thus, in this troubleshooting we have learned about how to fix the SharePoint Server Error: “Sorry, something went wrong. There was an exception in the Database”

See Also: SharePoint Online tutorial

You may also like the below SharePoint Online tutorials:

Download SharePoint Online PDF Book

Download SharePoint Online & Office 365 Administration eBook

Buy the premium version of SharePoint Online & Office 365 administration eBook from here:



Buy SharePoint Online & Office 365 Administration eBook


 

Get the free demo PDF eBook from here:

FREE DOWNLOAD

Send download link to:

Subscribe to get exclusive content and recommendations every month. You can unsubscribe anytime.

About Post Author

Do you have a better solution or question on this topic? Please leave a comment