Monday, March 19, 2012

Linked Server Error Between SQL Server and Oracle

I have used Linked Servers to hook up to an Oracle 9i database in SQL
Server 2000. I can see all the Tables and Views when I look in the
linked server section. I can also run the following SQL statement :

Select *
from Orcldb..SYSTEM.CrossTabSaveSites

and get a return result. The problem I realize is that some of the
tables are going to be quite larger and I can't wait for SQL Server to
download all the data and parse it itself, so I tried to use a
passthrough query like so :

SELECT * FROM OPENQUERY(OrclDB, 'SELECT * FROM
SYSTEM.CrossTabSaveSites')

Unfortunately this gives me the error message :

Server: Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing a query for execution against OLE DB
provider 'MSDAORA'.
[OLE/DB provider returned message: ORA-00942: table or view does not
exist
]

There is also the issue of speed. It takes about 15 seconds to come
back to me to tell me that the table/view doesn't exist, but sometimes
it comes back immediately. Is this something with the user
permissions in Oracle? (Don't really know much about Oracle) It just
seems like a very long time to wait just to let me know that the item
doesn't exist.

Any help would be greatly appreciated,

-Jevon Thurlow"Jevon" <jevonthurlow@.hotmail.com> wrote in message
news:34e7f100.0404080933.2e40e19e@.posting.google.c om...
> I have used Linked Servers to hook up to an Oracle 9i database in SQL
> Server 2000. I can see all the Tables and Views when I look in the
> linked server section. I can also run the following SQL statement :
> Select *
> from Orcldb..SYSTEM.CrossTabSaveSites
> and get a return result. The problem I realize is that some of the
> tables are going to be quite larger and I can't wait for SQL Server to
> download all the data and parse it itself, so I tried to use a
> passthrough query like so :
> SELECT * FROM OPENQUERY(OrclDB, 'SELECT * FROM
> SYSTEM.CrossTabSaveSites')
> Unfortunately this gives me the error message :
> Server: Msg 7321, Level 16, State 2, Line 1
> An error occurred while preparing a query for execution against OLE DB
> provider 'MSDAORA'.
> [OLE/DB provider returned message: ORA-00942: table or view does not
> exist
> ]
> There is also the issue of speed. It takes about 15 seconds to come
> back to me to tell me that the table/view doesn't exist, but sometimes
> it comes back immediately. Is this something with the user
> permissions in Oracle? (Don't really know much about Oracle) It just
> seems like a very long time to wait just to let me know that the item
> doesn't exist.
> Any help would be greatly appreciated,
> -Jevon Thurlow

I can't tell you anything about the performance issue, but the ORA-00942
error is probably because Oracle is case-sensitive, and object names are
usually in upper case:

http://support.microsoft.com/defaul...kb;EN-US;240340
http://support.microsoft.com/defaul...kb;EN-US;280106

Simon

No comments:

Post a Comment