June 8, 2016 at 6:00 am
Hi,
We will be upgrading our Database servers soon. For many reasons I would like to keep the same server name, instance and database name(s). Basically just swap out hardware but everything remains the same.
I am keeping the old server on the domain but will rename and use as a staging server.
I know the same SQL instance names cannot co-exist on the same domain.
I want to be able to detach and copy over to the new server my MDF, LDF - then re-attach on the new server.
Is there a way I can do a rename - swap instance names , etc? Or is there a better method I'm not thinking of?
June 8, 2016 at 7:05 am
I have done this one time with a vm - You could create the new server (with new hardware) with a temporary name, install sql, then either restore or attach the databases, rename the old server, then, re-name the new server to the old name. You would then need to run this code after the server was renamed, to get sql synched with the new name:
sp_helpserver
select @@servername
go
sp_dropserver 'OLDSNAME'
go
sp_addserver 'NEWNAME','local'
go
sp_helpserver
select @@servername
go
June 8, 2016 at 3:34 pm
this is pretty much what I was thinking of doing...thanks!
June 9, 2016 at 1:50 pm
Best approach could be for long term solution, Creat the VIP and VIP name for each server then the server name is invissible to application.
Its easy to manage when we build new server for upgrade.
For Example...
You can create the VIP name as (Applicationname.domain.com)
Under this VIP name you can add or remove any server you build...Remove the old server from VIP and add the new server after you build and test.
It required zero change in application and no user will no ther is some upgrade.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply