computer name change

  • We are going to switch current existing server to a new virtual server. And we will get rid of current one.

    Then we will change the computer name for the new one as the old server computer name.

    I read some articles about how to rename sql server after renaming computer, by using sp_dropserver,

    Sp_addserver.

    But my question is a step before this, since I never rename a computer before , esp, there is another computer existing in the domain.

    What is the step to do it?

    And also in case there is some failure for the new server, and we want to restore the old server, how the name will be related with this?

  • If a computer name already exists on the network, it will not allow you to change the computer name. If you run into any problems after changing the server name, you can always change the computer name back to original and rename SQL Server using dropserver and addserver method.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Thanks, so if the name exists,(for our case it is, because it's current exiting one) what steps I should take to delete the exiting one?

    Or just turn it off, it will work?

    if delete, delete in AD? DNS? or both? and where else?

    Thank you

  • First rename that computer. That would take care of everything like AD/DNS etc. After that you can rename the other computer.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Thank you,

    I have another person told me I may not need to rename computer, just change DNS name point to the new IP address.

    I have vague concept about DNS, if I changed DNS to point to the new server IP, do I still need to change sql server name(not computer name, although I use default instance) by using sp-dropserver, sp_addserver, also do I need to change reporting service name(I use default too)?

    I kind of getting confued now?

    Thanks

  • I am no expert on DNS. It can be an option. If you change the DNS to point to the new IP, the server name remains the same. Hence there is no need to change the SQL Server instance name.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • The Windows computer name is resolved with NETBIOS on the Windows network. You cannot have two computers with the same name, so Windows prevents this.

    DNS is a name lookup service, that is separate from the Windows computer name. Your DNS file should not allow two hosts with the same name and different IPs. Typically if you have people connecting to the computer through a full qualified domain name (FQDN) then you would need to change the entry.

    They are completely separate. Change both to be sure everyone can connect.

  • Thank you very much,

    But I got confused now.

    Shall I go with the rename computer process, or shall I go with DNS approach?

    If I use DNS to point to the new server IP, Do I still need to run sp_dropserver, and sp_addserver?

    Thank you

  • Like mentioned earlier, if the DNS points to the new IP, SQL Server name need not be changed.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • It depends on how users connect to the computer.

    If you are not sure, then change both.

  • Steve said:

    "It depends on how users connect to the computer.If you are not sure, then change both."

    I 'm not sure about how applications connect to the database server, some my use ODBC, some directly connect to the database, some use connection String. So when you say change both, you mean,

    1. rename the computer

    2. and rename the sql server by sp_dropserver,sp_addServer

    Correct?

    Also How this works, when connecting the database server, it will first check DNS, then AD, or some other order?

    Thanks

  • I think you can do this ..

    Existing Server ----------> Server A

    Switched to VM -----------> Server B (This name should be unique)

    Shut down old Server A

    Rename Server B to server A

    Thank You,

    Best Regards,

    SQLBuddy

  • You need to read up on this. It's really something that's not easily explained in detail. However the connection strings that are used by clients can determine how the client connects, whether with Windows networking or through DNS.

    You are correct, you need to do both a) change the computer name with sp_dropserver and b) change DNS.

  • Thank you, this is very helpful.

    An additional question about this:

    On the computer that hosts sql server, there are sql server related windows security groups created when installing sql server, example as :

    SQLServer2005DTSUser$ComputerName

    SQLServer2005MSFTEUser$ComputerName

    SQLServer2005MSOLAPUser$ComputerName

    SQLServer2005MSSQLServerADHelperUser$ComputerName

    SQLServer2005MSSQLUser$ComputerName

    SQLServer2005NotificationServicesUser$ComputerName

    As you can see they have a string $computerName in it.

    After renaming the computer, and run sp_dropserver, sp_addserver, is the computername changed in the security group name, or Do I have to manually change them to the new computer name?

    Thank you!

  • The names of the groups do not matter. They will not be changed automatically, but you can change them if you like.

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

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