简体   繁体   中英

Linked server provider issue

We have recently changed the database servers, and had to move the linkedserver setup from one server to the other.

In the previous server the linked server's provider was MSDAORA and in the new server it was set to MSDASQL.

After we move the database to the new server(with provider MSDASQL), when retrieving the data with different criteria (ascending or descending order) we are not getting the same records (different row nums).

Do the different provides effect the way the data is being retrieved?

It's important to mention that the new environment is in 64bit flavour. That's why the old microsoft provider won't work, because it's only made for 32bit and is out of support. Also better if you mention the server versions (SQL 2008 R2 and oracle client and server).

A Gentle man Tim Ford has created this manual to setup the linked server to oracle on a 64bit environment: http://www.mssqltips.com/tip.asp?tip=1433

In his examples, I see that the provider should be "OraOLEDB.Oracle", but you have "MSDASQL", which is an ODBC provider.

I've noticed someone had a similar problem with ODBC to Oracle on SQL2000: http://itknowledgeexchange.techtarget.com/itanswers/linked-server-query-returns-incomplete-results/

I suggest to create a proper oracle linked server and see if that helps as pulling data through ODBC may be the problem. In the meantime, you might want to check the queries from the previous link adapted to your case:

select count(*) from OPENQUERY([TEST],'SELECT * FROM APICKEL.ROOMBED')
select * from OPENQUERY([TEST],'SELECT count(*) FROM APICKEL.ROOMBED')

What's the results?

Kind regards, Rob

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM