I want to create a linked server between mysql and db2 as i need to fetch data from these two different database servers at one go. help needed on this as i have done a lot of search but coudnt find my scenario. (just need to know how to configure a linked server mysql to db2).
After a long search i myself come up with an answer for the above self post and thought of posting it here as it will be helpful for others in case of any combination of scenario where we need to fetch data from two different database server which r remote/local in nature and when linked server concept fails. We may use a third party jar called as Unity Jdbc which we can use in our java code in simple manner for loading driver then getting connection . one can visit [Unity Jdbc] However in this case we load an xml based file which has definition of desired datasource of our requirement. once everything is set one can then easily form a query from two different tables from two different remote databases. syntax : dbname.tablename.fieldname Addingly we dont need to handle any further xml configuration for closing internal connection created after closing the outer actual connection. :
Without knowing what you have tried we might end up suggesting steps you have already taken.... but Create Linked server, select OLE DB, enter connection string values appropriate for the mySQL or DB2 server and database that you are trying to connect to. What error are you getting, at what stage?
@Fatherjack thats ok! but still any help from anybody will be grateful as have googled up for my mentioned requirement but coudnt find anything alas finally thought of posting so that if somebody come up with a better answer that will be beneficial for future references. Anybody any idea (creating linked server between mysql and db2)???