Nav view search

Navigation

Search

The Exchange

The place to download pre-configured tickets, code snippets, and solutions

Back

Troubleshooting MetaSQLMail: SQL Server Name Changes

This snippet describes a problem with the MetaSQLMail job that can occur if the name of the server that SQL Server is installed on has been changed.

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:

  1. Open SQL Server Management Studio and click New Query.
  2. Type Select @@ServerName to verify that the servername. If the name is incorrect, continue with #3.
  3. Type sp_dropserver ‘EnterOldServerNameHere’
  4. Enter the correct name by typing sp_addserver ‘NEWSQLSERVERNAMEHERE’, 'local'
  5. Restart the MSSQL service and SQL Server Agent service.
  6. Verify the change has been applied by repeating steps 1 and 2.

Last Modified:

2011-09-29

by

Mark Guthart