Copy Virtual Machine With SQL Server Installed

August 16th, 2006 Leave a comment Go to comments

I copied the VHD file of a virtual machine that had SQL Server 2000 installed on it. After running NEWSID from Sysinternals and giving my virtual machine a new name, I had to deal with the fact that SQL Server would not recognize my new machine name. Luckily I found this FAQ on Vyas’s web site that solved my problem. Essentially I had to drop and add my SQL Server as follows in order for things to start working correctly:

EXEC sp_dropserver 'Your_OLD_Computer_Name'
GO

EXEC sp_addserver 'Your_NEW_Computer_Name', 'local'
GO

Restart your SQL Server service. Connect using Query Analyzer and run the following command (It should output the new server name):

SELECT @@SERVERNAME
GO

  1. Anonymous
    August 16th, 2006 at 20:31 | #1

    That’s great! I had the exact same problem, but never found the time to research it.

  1. No trackbacks yet.
 

Comment moderation is enabled. Your comment may take some time to appear.