Sample Header Ad - 728x90

MSG 14262: The specified @server_name ('<server_name>') does not exist

4 votes
1 answer
658 views
We have an SQL Server 2019 instance (let's call it 'sample_instance') with server collation of Turkish_CI_AS. When I try to create a job, SSMS creates the part of the script that adds the target server as following:
EXEC msdb.dbo.sp_add_jobserver @job_name=N'_test_job',
                               @server_name = N'SAMPLE_INSTANCE'
The problem is that the uppercase of letter 'i' is 'İ' according to the server collation. And this incompatibility between 'i' and 'I' results in problem as the title. I have tried the following:
EXEC sp_dropserver 'sample_instance';
GO
EXEC sp_addserver 'SAMPLE_INSTANCE', 'local';
GO
However, the results were the same. I tried restarting the service and didn't change the results. The latest cumulative update for SQL Server 2019 is installed and I'm using the latest version of SSMS. I can use '**Script Action to New Query Window**' and change the script to
EXEC msdb.dbo.sp_add_jobserver @job_name=N'_test_job',
                               @server_name = N'sample_instance'
and that way it works but I'm trying to find a permanent solution. I cannot change the server collation as all the databases are Turkish_CI_AS and changing the collation could result in bigger problems. Are there any suggestions as to how I could fix this?
Asked by halid.sert (87 rep)
Jul 8, 2024, 11:41 AM
Last activity: Jul 24, 2024, 03:49 PM