Rename a Computer that Hosts a Stand-Alone Instance of SQL Server

Problem

Create Failed for JobStep "ETL1-iQSonar-Extract"

Error in install of V3 DH
ETL Package deployment failed


Solution - To rename a 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:

  1. Check if name is the old server name

    SELECT @@SERVERNAME AS 'Server Name';

  2. Run following command

    sp_dropserver 'old_name';
    GO
    sp_addserver 'new_name', local;
    GO
  3. Restart the SQL Server service
  4. Check new name of server
  5. SELECT @@SERVERNAME AS 'Server Name';

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

  1. Check if name is the old server name

    SELECT @@SERVERNAME AS 'Server Name';

  2. Run following command

    sp_dropserver 'old_name\instancename';
    GO
    sp_addserver 'new_name\instancename', local;
    GO
  3. Restart the SQL Server service
  4. Check new name of server
  5. SELECT @@SERVERNAME AS 'Server Name';

Additional Considerations

Remote Logins - If the computer has any remote logins, running sp_dropserver might generate an error similar to the following:

Server: Msg 15190, Level 16, State 1, Procedure sp_dropserver, Line 44 There are still remote logins for the server 'SERVER1'.

To resolve the error, you must drop remote logins for this server.

See https://msdn.microsoft.com/en-us/library/ms143799.aspx for more info