0

I need to get some columns from SQL Server and others from DB2.

And if possible even use an inner join on them to join them (but it would already help to get data from both even if the join is impossible).

Is this even possible? Or would i have to move data from one to another and have it in sync? Any ideas how to solve this are welcome.

Amit Joshi
  • 15,448
  • 21
  • 77
  • 141
tedi
  • 6,350
  • 5
  • 52
  • 67
  • 2
    You may go with MS SQL feature - Link Server. Create Link Server for DB2 into SQL Server and fetch data using Dapper as per business needs. A few references: https://support.microsoft.com/en-us/help/222937/creating-a-linked-server-to-db2-using-microsoft-ole-db-provider-for-db https://www.mssqltips.com/sqlservertip/2151/how-to-create-a-sql-server-link-server-to-ibm-db2/ https://stackoverflow.com/questions/6768120/how-to-add-an-ibm-db2-server-to-sql-servers-linked-server – vrluckyin Dec 01 '17 at 08:46
  • @vrluckyin I saw that already but didn't know that i can also link DB2. I thought that this was only for multiple MS SQL Servers. Will try that. Thanks! – tedi Dec 01 '17 at 08:58
  • @vrluckyin can I link with "Microsoft SQL Server Standard Edition (64-bit)"? Or do i need the "Enterprise" edition? – tedi Dec 01 '17 at 09:31
  • 1
    Yes, even you can create on SQL Express, please refer this url - https://stackoverflow.com/questions/4162171/linked-server-in-sql-server-express – vrluckyin Dec 01 '17 at 12:34
  • I managed to link it. Now i just don't know how to join the two tables with left join from these 2 db servers. I must be using the wrong names or something... Will research it more tomorrow. But thanks for pointing me in the right direction! – tedi Dec 01 '17 at 14:03

0 Answers0