We had a nightmare setting something similar up, specifically with the issue of connecting to multiple Informix environments. I had several Informix instances that needed to be linked to a single SQL Server instance for warehousing purposes, and was told by our resident SME that this was impossible; only a single Informix instance could be referenced per server.
I would consistently receive the same errors as you, and nothing I was able to dredge up online proved helpful.
Ultimately, the solution had several parts, of which you've done the first few:
- The correct
IBM Informix ODBC Driver
must be installed on the database server.
- Use the SetNet32 application provided with the drivers and set up the Server Information tab appropriately. Additionally, set up a corresponding System DSN entry.
The trick with the Linked Server setup is to use the following (items in codeblocks are literal):
- Provider:
Microsoft OLE DB Provider for ODBC Drivers
- Product Name:
Ifxoledbc
- Data Source: $YourSystemDSNName
- Provider String
- Driver =
{IBM INFORMIX ODBC DRIVER}
- Database = $YourDatabaseName
- etc...
If you're more of a manual SQL kind of person, see below. The provider string is pulled into a variable for inline commenting purposes only, while still having executable code. Modify as needed:
DECLARE @provider NVARCHAR(4000);
SET @provider = N'Driver={IBM INFORMIX ODBC DRIVER};'
+ N'DATABASE= ;' --Informix DB name
+ N'HOST= ;' --Informix Hostname or IP adddress
+ N'SERVICE= ;' --Informix service name, ex. ifx1_tcp1
+ N'PROTOCOL= ;' --Informix protocol, ex. onsoctcp
+ N'SERVER= ;' --Informix server, ex. ifx1
+ N'DB_LOCALE=en_US.819; CLIENT_LOCALE=en_US.819;'; --Change to your locale, as needed
EXEC master.dbo.sp_addlinkedserver
@server = N'UCCX', --Linked Server system name
@srvproduct=N'Ifxoledbc',
@provider=N'MSDASQL',
@datasrc=N' ', --Your System DSN Name
@provstr= @provider;
Since you're dealing with a single instance, it should be enough to simply match the values used to create your System DSN. If you need to add additional linked servers for other instances, that can be done following exactly the same format described above without additional DSN entries.
I hope that helps.
Best Answer
What providers are available on your SQL Server?
In SSMS --> Server Objects --> Linked Servers --> Providers
Do you see an Oracle provider? If not install the provider which I believe you can find here: http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html
If that doesn't work you can try this:
Create an ODBC connection on the server, and then create a linked Server with Microsoft OLE DB for ODBC drivers. Kind of a dirty way to do it, but it should work if you don't have the ability to install the oracle provider.