Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 360
  • Last Modified:

renaming and sql server (instance)

I needed to create a test environment for my main business application (McKesson) on server 2008 R2 and SQL2008.
I used Symantec system recover 2010 and imaged to a new similar server.  This went well and both are basically identical.  I change the ip address of the new server but cannot bring it on the network until I do a name change.
My problem is the SQL, I do not think it is a good idea to have two servers with the same SQL server name (the original is the same as the server name).
Is there a way to rename the SQL server so it is never confused with the original on the network?
0
wlasner
Asked:
wlasner
1 Solution
 
Chris MangusDatabase AdministratorCommented:
Use:

EXEC sp_dropserver 'oldname'
GO
EXEC sp_addserver 'newname', 'local'
GO

Then, stop and restart SQL Server service.  check to see if the name was changed with SELECT @@servername
0
 
wlasnerDirector, ITAuthor Commented:
Executed against Master DB - worked perfect.

Thank you
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now