Question

Morgan de Jonge on Fri, 20 Jan 2017 11:05:07


Hello,

We've removed two search service applications from Central Administration and replaced it with a new one. The previous two search applications were configured to do an incremental crawl every 15 minutes.

The new Search Service Application works fine, but every 15 minutes, we get event messages and critical errors in the ULS, mentioning that the Crawl User Account cannot access the Search_Service_Application_DB of the removed Search Service Application. 

These errors are logged from the mssearch.exe process and mention the GUID of the removed SSA. Somehow, the scheduled tasks were not properly removed and SharePoint keeps trying to crawl these non existing databases for this no longer existing service application.

Does anyone know how to remove these orphaned scheduled crawls / orphaned content sources?

Below are some entries from the ULS:

  • 11:29:36.77 mssearch.exe (0x017C) 0x1374 SharePoint Server Search Crawler:Gatherer Service ag69q Medium lokMountInternal is called for application '<GUID of old SSA>' because it is not mounted  [gthrapp.cxx:6587]  search\native\gather\gthrsvc\gthrapp.cxx
  • 11:29:36.77 mssearch.exe (0x017C) 0x1374 SharePoint Server Search Crawler:Gatherer Service ds3r High mounting gatherer application <GUID of old SSA>              [gthrapp.cxx:6335]  search\native\gather\gthrsvc\gthrapp.cxx
  • 11:29:36.77 mssearch.exe (0x017C) 0x1374 SharePoint Server Search Crawler:Gatherer Service drx4 High initializing gatherer application <GUID of old SSA>          [gthrapp.cxx:156]  search\native\gather\gthrsvc\gthrapp.cxx
  • 11:29:36.77 mssearch.exe (0x017C) 0x1374 SharePoint Server Database 880i High System.Data.SqlClient.SqlException (0x80131904): Cannot open database "<name of deleted Search Service Database>" requested by the login. The login failed.  Login failed for user '<Crawl User Account>'.     bei System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)     bei System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)     bei System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)     bei System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)     bei System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)     bei System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)     bei System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)     bei System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)     bei System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions)     bei System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)     bei System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)     bei System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions userOptions)     bei System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions)     bei System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)     bei System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)     bei System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)     bei System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)     bei System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)     bei System.Data.SqlClient.SqlConnection.Open()     bei Microsoft.Office.Server.Data.SqlSession.OpenConnection()  ClientConnectionId:<guid>
  • 11:29:36.77 mssearch.exe (0x017C) 0x1374 SharePoint Server Database 880j High SqlError: 'Cannot open database "<Deleted DB of old SSA>" requested by the login. The login failed.'    Source: '.Net SqlClient Data Provider' Number: 4060 State: 1 Class: 11 Procedure: '' LineNumber: 65536 Server: '<server name>'
  • 11:29:36.78 mssearch.exe (0x017C) 0x1374 SharePoint Server Search Crawler:Common cd10 Critical Could not access the Search database. A generic error occurred while trying to access the database to obtain the schema version info.  Context: Application '<GUID of old SSA>'  Details:   (0x80131904)

Thanks in advance!


Morgan - http://blog.morg.nl - @morgnl


Sponsored



Replies

Linda Zhang on Mon, 23 Jan 2017 08:26:30


Hi Morgan,

Try using stsadm –o deleteconfigurationobject command to delete the orphaned Search Service Application.

stsadm -o deleteconfigurationobject  -id <GUID of Search Service Application>


Best Regards,

Linda Zhang

Morgan de Jonge on Tue, 24 Jan 2017 10:29:43


Alas, when I run stsadm -o deleteconfigurationobject -id <GUID of SSA>, it returns with the message : The SPPersistedObject with id, <guid>, could not be found.

Linda Zhang on Wed, 01 Feb 2017 02:14:55


Hi Morgan,

Please clear the configuration cache and perform an IISREST on the server to get all the SharePoint servers up to date on the latest farm information, check if the issue still exists.

Information about Clearing SharePoint configuration cache:

https://blogs.msdn.microsoft.com/jamesway/2011/05/23/sharepoint-2010-clearing-the-configuration-cache/

Best Regards,

Linda Zhang