SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


rename SQL server


rename SQL server

Author
Message
george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10320 Visits: 13687
the developers are asking a lot of you there, the code should be flexible enough to cope with changes in server names for DR and migration from test to prod at least. Investigate using DNS aliases in their connection strings so these can just be repointed.

It is easier to change connection strings then rename servers.

---------------------------------------------------------------------
Gazareth
Gazareth
SSCarpal Tunnel
SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)

Group: General Forum Members
Points: 4011 Visits: 5826
george sibbald (3/6/2013)
the developers are asking a lot of you there, the code should be flexible enough to cope with changes in server names for DR and migration from test to prod at least. Investigate using DNS aliases in their connection strings so these can just be repointed.

It is easier to change connection strings then rename servers.


+1
Markus
Markus
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3005 Visits: 3769
We use dns aliases for this purpose. Although, we DO have some app folks that ping that name and find out the real name and use it. Frustrating when we move the server and their connections don't work.



george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10320 Visits: 13687
Markus (3/6/2013)
We use dns aliases for this purpose. Although, we DO have some app folks that ping that name and find out the real name and use it. Frustrating when we move the server and their connections don't work.


Doh!

---------------------------------------------------------------------
sqlfriends
sqlfriends
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3850 Visits: 4014
Thanks all,

We have situation like this;
We have 3 servers, for example they are named as SQL1, (dev)and SQL2(test), SQL3(prod). test and prod are same hardware and RAM.
When doing upgrade we do on dev first and test everything, this include windows upgrade and sQL server new version, migrating dbs.
Then we want to use the test box test1 to do the exactly the same thing but when done, we want switch this as a production server, then the old production server we will use as testing server.

In this case, we want to rename back for prod SQL3, and test SQL2.
We can keep the servername as they are, the developrs need to change the connection string.

Situation 2
When doing virtual to virtual server copy, after that we need to rename the server name, for the cloned copy still has the original copy name.


But by reading this post answers, do you mean most DBA don't do renaming server much.

You tell developers to change their connection string.
also you use alias name, it seems using alias name sometimes confusing too.

I really don't like to rename servers, because it leaves footprint of old computer name, that is why my original question raised.

What should I tell developers that renaming servers is harder than changing connection string in their code?

Thanks
george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10320 Visits: 13687
I've not heard of anyone else changing server names and switching test and prod environments as part of an upgrade cycle. Keep prod as prod and test as test, then you won't have to change server names and devs won't have to change their code.

I can count the number of times I have changed a SQL server name on the thumbs of one hand.

There are a number of loose ends with changing a server name as you have already found, and I suspect to fully rename a server at the OS level you would have to go right down to the BIOS level.

Industry practice would be to put the flexibility in the connection strings, so keep it simple and push for that. You may be getting away with it now but start introducing complications like SSIS, SSRS, replication it will bite you sooner or later.

---------------------------------------------------------------------
sqlfriends
sqlfriends
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3850 Visits: 4014
george sibbald (3/6/2013)
I've not heard of anyone else changing server names and switching test and prod environments as part of an upgrade cycle. Keep prod as prod and test as test, then you won't have to change server names and devs won't have to change their code.

I can count the number of times I have changed a SQL server name on the thumbs of one hand.

There are a number of loose ends with changing a server name as you have already found, and I suspect to fully rename a server at the OS level you would have to go right down to the BIOS level.

Industry practice would be to put the flexibility in the connection strings, so keep it simple and push for that. You may be getting away with it now but start introducing complications like SSIS, SSRS, replication it will bite you sooner or later.



Thanks,

For the switching prod and test server I mentioned above, because we only have those 3 servers, and this has to be a side by side upgrade, not in place upgrade, it also includs windows version upgrade.

I have to intall on test server first, then switch with the produciton box. Because we only have the 2 hardware available.

If I don't do that way, what else would you recommend?

Thanks
george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10320 Visits: 13687
upgrade dev, test till you are happy

upgrade test, test until you are happy

upgrade prod. If its a virtual, take a snapshot before the upgrade as a quick backout.

You cannot be doing OS and SQL upgrades that often for this to be a problem?

---------------------------------------------------------------------
sqlfriends
sqlfriends
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3850 Visits: 4014
george sibbald (3/7/2013)
upgrade dev, test till you are happy

upgrade test, test until you are happy

upgrade prod. If its a virtual, take a snapshot before the upgrade as a quick backout.

You cannot be doing OS and SQL upgrades that often for this to be a problem?



Only dev is virtual, both test and prod are physical.

Not sure I understand you:
You cannot be doing OS and SQL upgrades that often for this to be a problem?

george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10320 Visits: 13687
Not sure I understand you:
You cannot be doing OS and SQL upgrades that often for this to be a problem?




you mentioned OS upgrades and new sql server versions in an earlier post, surely these are rare? If you mean just patches these are too quick to apply to warrant this approach.

---------------------------------------------------------------------
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search