Servicing Director Customer Self-Service W_GetCompanyWorkdays Error: "...Could Not Find Server ... in Sys.Servers...."
Msg 7202, Level 11, State 2, Line 1
Could not find server '<a server name>' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
Msg 6522, Level 16, State 1, Procedure D_spGetCompanyWorkDays, Line 0
A .NET Framework error occurred during execution of user-defined routine or aggregate "D_spGetCompanyWorkDays":
System.Data.SqlClient.SqlException: Could not find server 'DEVDHDB' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
System.Data.SqlClient.SqlException:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnectionSmi.EventSink.DispatchMessages(Boolean ignoreNonFatalMessages)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQuerySmi(Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.ExecuteToPipe(SmiContext pipeContext)
at Microsoft.SqlServer.Server.SqlPipe.ExecuteAndSend(SqlCommand command)
at D_GetCompanyWorkDays.D_spGetCompanyWorkDays(SqlDateTime CutOffTime, SqlInt32 DaysInAdvance, SqlDateTime TransPostDate)
Root Cause:
This error can be caused by changes to the Microsoft SQL Server.
The information below is for your system administrator or local IT.
Workaround:
This issue can be caused by changing the computer name of the Windows server which hosts the Microsoft SQL Server after Microsoft SQL Server is already installed.
Microsoft SQL Server support resources would be the authority on the subject of changing the name of the server when Microsoft SQL Server is already installed.
For your convenience, part of the Microsoft support information for this subject is provided below.
The following procedures require a knowledge of Microsoft SQL Server, the name of your Microsoft SQL Server, and whether it is a named instance or not.
A restart of the Microsoft SQL Server service is required.
- Perform the following SQL command:
- The result from this command should be a server name that does not match actual computer name (and named instance if you have one) of the Servicing Director database server. Use this wrong name you just found in the next query, replacing the xxxxxx characters, leaving the single quotes in place.
- Then, run the following query using the actual computer name (and named instance if you have one), replacing the xxxxxx characters, leaving the single quotes in place. Also add the 'local' parameter when the instance is the "default" instance (the computer name matches the Microsoft SQL Server name using no additional instance name):
- Without named instance, run this:
- sp_addserver 'xxxxxx', local
- With named instance, run this:
- After performing this solution, be sure to restart the Microsoft SQL Server service.
ArticleNumber:
000044236