Crawler Fails With "Unable to Connect to Content Databases
When using a non-default port, there are cases in which File Access Manager fails to connect to the SharePoint databases using the existing configuration.
In the log file, you can see that the Crawler connected to the SharePoint_config DB using the server,port address:
DEBUG,WBX.Common.SharepointDataAccess.DataAccessCore,executeStoredProcedure,connectionString = Data Source=[Server Name]\[Instance Name],3123;Initial Catalog=PR_SharePoint_Config;Integrated Security=True
but fails to connect to the SharePoint content DB, and the log shows that the connection is attempted without using the port
DEBUG,WBX.Common.SharepointDataAccess.DataAccessCore,executeStoredProcedure,connectionString = Data Source=[Server Name];Initial Catalog=WSS_Content[_DBNAME];Integrated Security=True
Error message:
2019-08-01 09:17:15,851,18,ERROR,WBX.Common.SharepointDataAccess.DataAccessCore,executeStoredProcedure,Execution of 'proc_GetTpWebMetaDataAndListMetaData' failed
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
Suggestion:
Using the Windows SQL Server Client Network Utility, create aliases for each SharePoint database server, to point to the server address including the port, in the format
[Server name], [port]
To set the aliases:
-
Open the Windows CMD as administrator
-
Cliconfg.exe
-
Click the Alias tab
-
Click Add to create a new alias
-
Select TCP/IP
Set the parameters:
Server Alias
The SharePoint database sever name
Server Name
If the database has an instance name, the address should be in the format “[Server Name]\[Instance Name]”
Dynamically Determine Port
If not using the default port, unselect this option, and enter the port number.
If the port is non-default, and this isn’t the default instance of the database, then you should create two aliases:
Server/Instance, port
Server,port
-
Restart the server, and retry the Crawl.