Results 1 to 2 of 2

Thread: sp_addserver

  1. #1
    Join Date
    Jun 2005
    Posts
    3

    sp_addserver

    Hi guys
    I was busy renaming my server and sp_dropserver worked but when it tried to execute sp_addserver it threw an error saying the server already exists. why did this happen and how do i fix it so that @@SERVERNAME is equal to the server name (at the moment it is null).
    Thanks
    Nick

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    --Sysservers table
    Use master
    go
    sp_configure 'allow updates',1
    go
    reconfigure with override
    go
    update sysservers set srvname='newservername',
    datasource='newseervername' where srvid=0
    go
    sp_configure 'allow updates',0
    go
    reconfigure with override
    go

    --Sysjobs table.
    Use master
    go
    sp_configure 'allow updates',1
    go
    reconfigure with override
    go
    use msdb
    go
    update sysjobs set originating_server ="newservername"
    go
    sp_configure 'allow updates',0
    go
    reconfigure with override
    go

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •