Renaming SQL Server COmputer

  • Hi All

      I am getting the following error when I tried to configure distributor in SQL Server 2005 system.

    SQL Server is unable to connect to server "XXX"

    what happend is we have changed the computer Name after we have installed the SQLL Server. We have default instance.

    when I execute "Select @@ServerName" it is showing the name which was there before installation.

    when I execute "Select * From sys.servers", it is showing the current computer name.

    And I have tried the following script "to change the name returned by @@ServerName", but it didnot work.

    sp_dropserver <old_name>

    GO

    sp_addserver <new_name>, local

    GO 

    Can anybody please help me in this regard...


    Thanks ,

    Shekhar

  • you need to update the "originating_server" column of the jobs that were already there ( on msdb)


    * Noel

  • what are the jobs you mentioned about..???...

    I am unable to setup the replication.. (unable to configure distributor,publication..).. because of the above..

     


    Thanks ,

    Shekhar

  • Dear Shekhar Naidu,

     I had also faced the same problem. In our situation we had installed sql server 2000 and created some scheduled jobs and after that we had renamed the system name. Then we are unable to edit or delete the old jobs. We googled and we found the following links which are very useful. I think these will be useful for you also.

    Link 1: http://support.microsoft.com/default.aspx?scid=kb;en-us;281642

    Link 2: http://blog.sqlauthority.com/2006/12/20/fix-error-14274-cannot-add-update-or-delete-a-job-or-its-steps-or-schedules-that-originated-from-an-msx-server-the-job-was-not-saved/

     Thanks & Regards

    Chandra Mohan N

     

    [font="Verdana"]Thanks
    Chandra Mohan[/font]

  • thank you

    sp_dropserver and sp_addserver worked for me..

    the only mistake was ... i did not restart the server after sp_addserver...

     

    anyways thanks to all of you for ur help..


    Thanks ,

    Shekhar

  • Don't forget to check the server name using SELECT @@SERVERNAME after renaming the server and running the SP_DROPSERVER AND SP_ADDSERVER....to make sure sql rename completed successfully in sql server...

    In BOL it is clearly mentioned, you should restart sql server after running SP_DROPSERVER AND SP_ADDSERVER procedures to take effect...

     

    MohammedU
    Microsoft SQL Server MVP

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

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