rename SQL server

  • After we changed computer name, and I renamed SQL server name too following ms articles. by using sp_dropserver, sp_addserver.

    But I see there are still somewhere on the server left with old computer name footprint.

    For example: there are some windows group see attached, they have old computer name there, shall I rename the groups?

    I am afraid if I rename it to include newer computer names, it will break something in the server, or registry?

    Or it is safe to rename?

    Thanks

  • The SID for the groups is actually used and this is not changed by the server rename so you don't have to rename the groups.

    ---------------------------------------------------------------------

  • george sibbald (3/5/2013)


    The SID for the groups is actually used and this is not changed by the server rename so you don't have to rename the groups.

    Thanks, that is good to know.

    But if I change it, will it affect anything, do those group name exist somewhere on the server, like registry etc. I checked they are not in security- login.

    Because we often have the situations like this - to rename servers, and leave the old computer names in windows group look unclean and confusing.

    But I wonder if I change them by replace the string of old computer name with new computer name in the windows group name, will it affect anything?

    Thanks

  • these groups are used to manage security outside of SQL, so I cannot see a reason they cannot be renamed like any other windows group, but I have never tried it so would not like to definitely say yea or nay.

    ---------------------------------------------------------------------

  • george sibbald (3/5/2013)


    these groups are used to manage security outside of SQL, so I cannot see a reason they cannot be renamed like any other windows group, but I have never tried it so would not like to definitely say yea or nay.

    Thank you, understandable.

    I can leave as they are, but since we do server renaming quite often whenever we do some upgrade, so would like to keep servers clean.

    But I got most of answers for this question is they are optional, and it seems most DBA leave them as they are, but I can never find somewhere online in microsoft site said if it is OK to change them and it won't affect anything.

    Thanks

  • We renamed a Win2003/SQL2005 server years ago. I left that the way it was and it has been fine for years.

  • Markus (3/6/2013)


    We renamed a Win2003/SQL2005 server years ago. I left that the way it was and it has been fine for years.

    Thanks, I think to leave them as the old computer name in the windows group, it should be fine.

    But I would like to know to change the windows group to inlcude new server name, will that affect anything?

    Thanks

  • That I don't know. Never tried it.

  • why the frequent server renames, can they not be avoided?

    ---------------------------------------------------------------------

  • As a DBA, I often have to rename server name when do the migration to a new server, or to do a Virtual to virtual clone.

    By renaming server name, save work for the application developer to have to change their connection strings in code or anything other places.

    So as time goes, I have to do the renaming servers thing more and more.

    That's why try to figure out how to keep clean the server by changing windows group name reflecting new server name.

    Thanks,

  • 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.

    ---------------------------------------------------------------------

  • 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

  • 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.

  • 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!

    ---------------------------------------------------------------------

  • 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

Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic. Login to reply