Question : Linked Servers to "Thunk" 64-bit to 32-bit OLEDB

We need to find a mechanism for "thunking" from our 64-bit MSSQL hosted PDM package to our ERP package that only provides 32-bit ODBC/OLEDB drivers.  We believe we can set up a linked server in the 64-bit MSSQL  (SQL64)to an intermediate MSSQL 32-bit instance (MSSQL32) with a linked server using the 32-bit OLEDB driver t(OLEDB32) o achieve this.  We have successfully   Somewhate graphically this is what we have.

MSSQL64
  |
LinkedServerToMSSQL32
  |
OLEDB64.sqlserver
  |
MSSQL32
  |
LinkedServerToERP32
  |
OLEDB32.erp
  |
ERP

In MSSQL32 we have created a linked server that uses the UNI OLEDB 32--bit driver and have successfully run queries via this MSSQL32 linked server, using the 4-part data source convention, truncated for our situation.

SELECT COUNT(*) FROM LinkedServer...Table

What is unclear is how we structure this query when we're running it via a connection into MSSQL64.

1) Is there a way to "nest"/ the 4-part data source or otherwise structure a SQL query to say use the MSSQL64.sqlserver Linked Server to connect to the MSQL32.erp Linked Server and retrieve data from the ERP database?

2)  Do we need to configure a very tailored Linked Server , View, Alias/Synonym or other mechanism in MSQL64 that connects "directly" to  the MSSQL32.erp Linked Server and thereby eliminates the need for a "nested" 4-part data source.?

FWIW, we are also evaluating CONNX's 64-it to 32-bit bridge, but are having teething pains that we're working with their support on.

Answer : Linked Servers to "Thunk" 64-bit to 32-bit OLEDB

A synonym should be ok, too (instead of a view).

There is no mechanism for direct chaining links, you cannot provide more than 4 name parts. If we had something available like   server(ServerOne).server(ServerTwo).db(ThisDB).owner(default).table(tblA), it would be possible.
So you need to use one of the "remote execution" features, like pass-thru-query (OpenQuery, OpenRowset, OpenDatasource), or a "exec with" to run a command on another server, or synonyms/views executed remotely.
Random Solutions  
 
programming4us programming4us