HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Cross server query using SSIS

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
crossssisqueryusingserver

Problem

I need to issue a query against DBs on two servers:

[CRM].[CRM].[dbo].[BasicInfo] (NationalID PK, CustomerCardNo)
[ERP].[ERP].[dbo].[Order] (OrderID PK, CustomerCardNo)


And what I want to do is like this:

select * 
from   [ERP].[ERP].[dbo].[Order] as O 
where  O.CustomerCardNo in (select CustomerCardNo 
                            from   [CRM].[CRM].[dbo].[BasicInfo]);


I think there are three ways to achieve this:

  • linked server: my manager would probably not authorize this because they are not familiar with linked servers;



  • open data source: company policies do not allow developers to have access to DB passwords;



  • SSIS: seems to be the only choice left, and my company adopts SSIS widely.



When I googled I had no luck finding tutorials regarding how to use SSIS to do this. The closest question is this. Please provide me with some guidance.

Solution

Since what you're doing is the equivalent of an inner join, give this a try:
SSIS Merge Join

Context

StackExchange Database Administrators Q#175328, answer score: 2

Revisions (0)

No revisions yet.