Information
After changing the name of the server computer where Microsoft SQL Server is installed, the MetaSQLMail job for a Workgroups database can fail with the following error appearing in the job's run history:
"...user DOMAIN\User failed to login to database "
Cause
When the name of a server running Microsoft SQL Server 2005 is changed through Windows but not also in MSSQL, SQL Server will display the old name of the server when the @@servername property is queried. The MetaSQLMail job queries this parameter.
Resolution
Update the servername in SQL Server.
To do this:
- Open SQL Server Management Studio and click New Query.
- Type Select @@ServerName to verify that the servername. If the name is incorrect, continue with #3.
- Type sp_dropserver ‘EnterOldServerNameHere’
- Enter the correct name by typing sp_addserver ‘NEWSQLSERVERNAMEHERE’, 'local'
- Restart the MSSQL service and SQL Server Agent service.
- Verify the change has been applied by repeating steps 1 and 2.