Linking databases from Different servers part2

  • server machine 1(IP = 192.114.0.1, Host = local1, Database = MyDB1,

    Table = customer1 , filed = cus_id, cus_name, cus_addr)

    server machine 2(IP = 192.114.0.2, Host = local2, Database = MyDB2,

    Table = customer2 , filed = cus2_id, cus2_name, cus2_addr)

    Suppose I write a stored Procedure in the server machine 1 and to

    extract data from the server machine 2 (Table = customer2) to put the server machine 1 (Table = customer1)

    EX

    CREATE PROCEDURE dbo.sp_addlinkedserver(

    @server = servername ,

    @provider = ‘MSDASQL’,

    @provstr = ‘DRIVER={SQL Server};SERVER=MyDb2;UID=user;PWD=password;’

    )

    AS

  • I'm not following what it is that your asking for???

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

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

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