page contents

About the Post

Author Information

SQL Job Agent fails when Windows name change

Have you ever had a server that had a name change, but you also had a SQL server database on it and now all of your SQL jobs fail?

Let’s say that your server used to be named IP-0A7653F2 and had SQL Server installed with some SQL jobs configured on it, but now it is called IP-0A6EB34C after a rename. This will cause an issue with the SQL server agent and any other scheduled jobs. You can confirm the name of the SQL server name by typing this into SQL Server Management Studio query window:

SELECT @@SERVERNAME AS ‘Server Name’

All of my jobs are running with no issues:

So now I am going to change the computer name and mess things up:

If I run SELECT @@SERVERNAME AS ‘Server Name’ it will report IP-0A7653F2 which is the old computer name, but your jobs are now running on the new name of IP-0A6EB34C and will cause your jobs to flake out.

To fix the issue you will need to rename the  computer that hosts a stand-alone instance of SQL Server

For a renamed computer that hosts a default instance of SQL Server, run the following procedures:

 

Restart the instance of SQL Server. Verify that the name change is taken effect by this SQL command SELECT @@SERVERNAME AS ‘Server Name’

 

For a renamed computer that hosts a named instance of SQL Server, run the following procedures:

Restart the instance of SQL Server.

To get more information on this topic and to resolve the issue, please see the following:

How to: Rename a Computer that Hosts a Stand-Alone Instance of SQL Server
http://msdn.microsoft.com/en-us/library/ms143799.aspx

Tags: , , ,

Comments are closed.

Copy Protected by Chetan's WP-Copyprotect.