How to add an IBM DB2 server to SQL Server's Linked Server -


from .net, i'm able connect db2 database:

  1. first include reference "ibm.data.db2.iseries"
  2. then create new ibm.data.db2.iseries.idb2connection. connection string is

    datasource=chadb2server;userid=myusername;password=mypassword; 
  3. then create ibm.data.db2.iseries.idb2command, , on.

now i'm trying sql server 2005 access same data directly. in sql server management studio, right-click on linked servers, , select "new linked server..."

linked server:   chadb2server provider:        ibm ole db provider db2 product name:    ??? data source:     chadb2server provider string: datasource=chadb2server;userid=myusername;password=mypassword; location:        ??? 

i can leave location blank, product name can't empty , don't know fill in here.

on security tab, select "be made using security context" , repeat userid , password.

the linked server gets created, when try expand catalogs / default / tables, error message:

ole db provider 'ibmdadb2.db2copy1' reported error. authentication failed. (microsoft sql server, error: 7399) 

i have no idea name ibmdadb2.db2copy1 came from.

also, when try select data:

select * chadb2server.chadb2server.information_schema.tables 

i similar error:

msg 7399, level 16, state 1, line 1 ole db provider 'ibmdadb2.db2copy1' reported error. authentication failed. 

obviously there's missing in way link servers. know how this?

i haven't had luck using ibm provider. hear it's tricky. however, have used microsoft ole db provider odbc drivers.

my configuration points dsn , works well. 3 fields have filled out provider (microsoft ole db provider odbc drivers), product name (value='not used') , data source (name of dsn on sql server).

if don't mind using odbc provider, work you.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -