change server name

  • Hi- i have changed my server of name and domain.

    I have a default instance and a named instance installed on it.

    I think i need to update the tables sysservers on SQL Server 2000 (default instance) and SQL Server 2005 (named instance) on that server.

    I try to do the update, but the message that i can not do had hoc changes to the sysservers table appears.

    Any ideia on how can i do this?

    tks,

    Pedro

  • You'll need to drop and re-create the connections.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • As far as I know you can only change the network name. Here is how...

    sp_dropserver '[YourOldDatabaseName]'--Present Server name goes here

    go

    sp_addserver '[YourNewDatabaseName]','local'--New Server name goes here

    go

    Then use @@servername to check your name.

    use sp_helpserver to see names that exist.

    If this is not the result you are after you may have to look at detaching databases and reinstalling to the names you want.This can be rather messy depending on views, stored procedures, logins etc. But it can be done by scripting everything. Hope this helps.

  • gunna48 (7/28/2008)


    As far as I know you can only change the network name. Here is how...

    sp_dropserver '[YourOldDatabaseName]'--Present Server name goes here

    go

    sp_addserver '[YourNewDatabaseName]','local'--New Server name goes here

    go

    Then use @@servername to check your name.

    use sp_helpserver to see names that exist.

    If this is not the result you are after you may have to look at detaching databases and reinstalling to the names you want.This can be rather messy depending on views, stored procedures, logins etc. But it can be done by scripting everything. Hope this helps.

    to be double sure run the following

    select @@servername, serverproperty('servername')

    the 2 names returned should match otherwise replication will not be possible

    ideally SQL server should be un installed, renamed then re installed

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

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • The cor

  • We've found some processes look in the sys.sysservers table. the above mentioned procs do the trick.

    you may have to stop and restart the engine, but it most likely can wait as the sysservers table is updated in real time.

    sp_dropserver '[YourOldDatabaseName]'--Present Server name goes here

    go

    sp_addserver '[YourNewDatabaseName]','local'--New Server name goes here

    go

    The more you are prepared, the less you need it.

  • I'd follow the advice above for both instances.

  • After you've run sp_dropserver, sp_addserver, you will need to restart SQL Server for the changes to take effect.



    Scott Duncan

    MARCUS. Why dost thou laugh? It fits not with this hour.
    TITUS. Why, I have not another tear to shed;
    --Titus Andronicus, William Shakespeare


  • This link should help as well:

    http://technet.microsoft.com/en-us/library/ms143799.aspx

    It gives a list of things you need to consider or at least be aware of.

Viewing 9 posts - 1 through 8 (of 8 total)

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