adding linked server

  • I am trying to add a linked server on a SQL 2000 box that also has replication set up. The server I am trying to add as linked is already set up as a remote server, and since it is involved in replication, I cannot drop the remote server and recreate as linked. I REALLY DO NOT want to have to drop all the affected subscriptions to be able to recreate the server as linked. Does anyone know a workaround to this? ANY ideas are appreciated.

  • Give this a try...

    
    
    IF NOT EXISTS (SELECT srvname FROM master.dbo.sysservers WHERE srvname = <ServerName>)
    EXEC sp_addlinkedserver <ServerName>
    GO

    --now do the mapping from local machine to Servers remote user account...
    EXEC sp_serveroption <ServerName>, 'data access', 'true'
    GO
    sp_configure 'allow updates', 1
    GO
    RECONFIGURE WITH OVERRIDE
    GO
    -- Add logins to the remote server.
    EXEC sp_addlinkedsrvlogin <ServerName>, 'false', <RemoteLoginName>, <LoginName> , <LoginPassword>
    go

    Gary Johnson

    Microsoft Natural Language Group

    DBA, Sr. DB Engineer




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

Viewing 2 posts - 1 through 1 (of 1 total)

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