Creating Linked Servers Using Windows Authentication

  • I am using SQL 2005. Now i want to create linked server for another SQL 2005 server using windows authentication.

    How to do this. Any help will be more useful.

    Thanks,

    Manoj

  • Here is the script that I use to create linked servers...

    DECLARE @strLinkedServer NVARCHAR(100)

    SELECT @strLinkedServer = 'Prod2005Server'

    EXECUTE master.dbo.sp_dropserver

    @server = @strLinkedServer,

    @droplogins = 'droplogins'

    EXECUTE master.dbo.sp_addlinkedserver

    @strLinkedServer,

    'SQL Server'

    EXECUTE master.dbo.sp_addlinkedsrvlogin

    @rmtsrvname = @strLinkedServer,

    @useself = N'False',

    @locallogin = N'SomeLocalUser', -- add local login

    @rmtuser = N'SomeDomain\SomeWindowsUser', -- add the remote login

    @rmtpassword = '****' -- add the remote login password

    --Ramesh


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

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