patternMinor
Cross server query using SSIS
Viewed 0 times
crossssisqueryusingserver
Problem
I need to issue a query against DBs on two servers:
And what I want to do is like this:
I think there are three ways to achieve this:
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.
[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
SSIS Merge Join
Context
StackExchange Database Administrators Q#175328, answer score: 2
Revisions (0)
No revisions yet.