Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002

    Unanswered: Linked Server with DB2


    I create a Linked server to a DB2 Database with this command

    EXECUTE sp_addlinkedserver
    @server = 'test',
    @provider = 'MSDASQL',
    @srvproduct = 'DB2',

    I can see the new linked server and the tables in the enterprise manager.

    But when I try to access a table of the db2 database (select * from , I get this error message:

    Server: Msg 7313, Level 16, State 1, Line 1
    Invalid schema or catalog specified for provider 'MSDASQL'

    Any thoughts or suggestions are appreciated.

    Thanks in advance.


  2. #2
    Join Date
    Feb 2002
    Houston, TX
    I would have expected the provider to be 'DB2OLEDB'.

    An example is provided in Books Online for establishing a liked DB@ server:

    I. Use the Microsoft OLE DB Provider for DB2
    This example creates a linked server named DB2 that uses the Microsoft OLE DB Provider for DB2.
    EXEC sp_addlinkedserver
       @srvproduct='Microsoft OLE DB Provider for DB2',
       @provstr='Initial Catalog=PUBS;Data Source=DB2;HostCCSID=1252;Network Address=XYZ;Network Port=50000;Package Collection=admin;Default Schema=admin;'
    Also, when I reference a table via a linked server I use the reference <server name>.<database name>.<owner name>.<table name>, does DB2 need this kind of reference?
    Paul Young
    (Knowledge is power! Get some!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts