Solved

renaming and sql server (instance)

Posted on 2011-09-09
2
343 Views
Last Modified: 2012-05-12
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
Comment
Question by:wlasner
2 Comments
 
LVL 17

Accepted Solution

by:
Chris Mangus earned 500 total points
ID: 36514043
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
 

Author Closing Comment

by:wlasner
ID: 36523329
Executed against Master DB - worked perfect.

Thank you
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question