rename sql server - downside?

  • Has anyone had negative consequences from renaming a sql server where the @@servername is not the same name as the machine name?

    Log Shipping setup failed with error "specified server cannot be found."  Both primary and secondary are sql 2005 standard edition.  Primary production sql server is named "brain."  However, the @@servername variable returns "Pinky"  As it turns out, the secondary sql server for log shipping is called Pinky.

    Yes we use a superhero naming convention for servers.  Obviously Brain was named Pinky at some point while sql was installed.  I'm tempted to rename the secondary server to something else but not sure that will solve my problem.  I've never renamed a production sql server ( Brain ) and am concerned about the consequences.

    Renaming sql server Brain

    sp_dropserver 'pinky'

    go

    sp_addserver 'brain','local'

    Information from Brain:

    select @@servername     pinky

    SELECT CONVERT(char(20), SERVERPROPERTY('servername'))     brain

     SELECT CONVERT(char(20), SERVERPROPERTY('instancename'))     null

     SELECT CONVERT(char(20), SERVERPROPERTY('machinename'))     brain

     

  • - have a look at How to: Rename a Stand-Alone Instance of SQL Server 2005

    - technically the sp_dropserver / sp_addserver does the switch. So connections and queries will work again...

    - If you take a look at the windows-groups that sqlserver did implement during install (e.g. pinky\SQLServer2005MSSQLUser$pinky$MSSQLSERVER)... this should be of no concern because it is the local usergroup's guid that is used and the names of windows-users or groups are never refreshed ! So keep in mind this may be a bit confusing !

     

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Yes I do see the groups added during sql install that have the name different that the current name of the server, and the tsql commands to rename sql server look easy.

    The question is what might break and how can I test that? Might be easier to name the log shipping secondary server to something other than Pinky.  Unless we are saying that log shipping setup fails because of the mismatched names on the primary and it has nothing to do with the secondary having that name.

  • I don't think anything will break if you change the sql server name to machine name...and I don't think there is any thing you can test...

    Even if anything breaks you have to fix with new name...could be any Linked server calls...

    MohammedU
    Microsoft SQL Server MVP

  • Indeed.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

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

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