How to set up and test a simple OLEDB Linked Server in Microsoft® SQL Server to allow retrieval of d

 

Resolving the problem

In order to set up a linked server from SQL Server the following checks need to be made.

  • Make sure you have the correct Informix Client SDK (32 or 64 bit) for the SQL Server (32 or 64 bit) you are using
  • Make sure the Informix OLE DB provider has been registered .     

    • From a command prompt run the appropriate regsvr32 application to register the Ifxoldbc provider.     
      • regsvr32 ifxoledbc
  • Make sure that the coledbp.sql script has been run against the sysmaster database for the Informix Instance. The coledbp.sql script can be found in the $INFORMIXDIR\etc directory of the Windows client machine where IBM Informix Client SDK or IBM Informix Connect is installed.
    Note - This should be run on the Server with the Informix Instance ( not the Microsoft® SQL Server)
      • dbaccess sysmaster coledbp.sql
  •      If the above script is not run against the IBM Infomrix Instance then the following error can be seen when attempting to select via a linked server.   

    • OLE DB provider "ifxoledbc" for linked server "demo_on" returned message "EIX000: (-111) ISAM error:  no record found.".
      Msg 7311, Level 16, State 2, Line 1
      Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "ifxoledbc" for linked server "demo_on". The provider supports the interface, but returns a failure code when it is used.

  • The Linked Server can now be created.
    •      From the Microsoft SQL Server Management Studio    
      •       In object explorer find your SQL Server instance ( up and running )     
        Click Server Objects -> Linked Servers , right click and "New Linked Server "    



    •      In this dialog box, set the following fields:     
        • Linked server: Specify the name for the SQL Server to link.
        • Provider: Choose IBM Informix OLE DB Provider from the drop-down list.
        • Product name: Specify the name of the Informix provider, which in this example is ifxoledbc.
        • Data source: Specify the name of the data source as database@server.
        • Provider string: Specify any additional connection string parameters that the provider uses.
The user ID for the Informix database server might differ from the one that is used with SQL Server. If so, you need to set a remote user mapping under the Security Page.  




The Linked Server can be used in the following manner from an SQL query  
    • select * from demo_on.stores_demo.informix.systables where tabid<3;
    • select * from Openquery(demo_on,'select * from customer');

More information about the Informix OLE DB Provider and other Informix application development can be found in the    IBM Informix Developers Handbook

The IBM Infocenter also has further information -    Introduction to IBM Informix OLE DB Provider

Your    Passport Advantage site will have the Client SDK ( containing the driver ) for download 

Related information

Linked Servers

 

 

http://www-01.ibm.com/support/docview.wss?uid=swg21195578

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值