Renaming a server

  • Hello all. I know that if I install a default instance of SQL Server on a server that the name of the default SQL instance is the name of the server. Then, if the server is renamed and restarted, SQL Server will alos have the new name. However, I've noticed if I run select @@servername that the value returned is the OLD name. Is there a reg hack/fix that will allow me to rename SQL Server to match that of the server once it has been renamed?

    TIA

    dab

  • Yes

    sp_dropserver old_name

    GO

    sp_addserver new

    hth dave

  • oops

    sp_dropserver old_name

    GO

    sp_addserver new_name, local

    I can't even cut and paste today!

    hth dave

  • and stop/restart SQL Server ... @@servername is set at startup I believe ...

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 4 posts - 1 through 3 (of 3 total)

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