joining data from multi sqlserver instances

csharp Austria
  • 14 years ago

    hej hej!

    I want to join data from two different sqlServers with different connections (different connection strings with user and pwd in different dataAdapters but the same dataSet) and without using linked servers!

    The Application should read 100 rows from a source Table on SQLServer1 and use this Data to insert/update/delete Data from a destination Table on SQLServer2.

    Without linked servers it is not possible to things like

             Select destination.* from SQLServer2.table as destination inner join

                                     SQLServer1.table as source on =

    And I also don't want to read the whole Table form SQLServer2 becouse it has more than 7.000.000 Rows.

    For the Insert and Delete I don't want to operate with sting concatination and a using a SQL Statement like Select * from SQLServer2.destinationTable where id in (xxxx,xxxxx,xxxx,....) or some like that.

    The Update has also to get more Data from different other Tables using the SourceTable ID as join attribute like a SQL Statement for linked Servers:

       Update destination set name =

             from SQLServer2.table as destination inner join

                     SQLServer1.table as source on =    inner join

                     SQLServer1.infotable as updateinfotable on =

     And I also don't want to walk through all the source row by row because of performance reasons 

    Thank's for all helpfull replies






Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The generation of random numbers is too important to be left to chance.” - Robert R. Coveyou