Anomalies in database link querying (Oracle to MS SQL Server 2005)
I have a database link from oracle to mssql using db4odbc / odbc32 (windows)
Problem 1,
When i do SELECT * FROM Orderdetail@"DB"query executes in 0.561 seconds..when i do SELECT * FROM Orderdetail@"DB" where "ItemNumber" = 10242;This query was running for 10 minutes before i canceled it, (i know we have a itemnumber 10242
when i do SELECT * FROM Customers@"DB";I getORA-28500: connection from ORACLE to a non-Oracle system returned this message:[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'A'. {42S22,NativeErr = 207}[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'RContactName'. ORA-02063: preceding 2 lines from DB28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
one via oracle (Sql Developer) one straight from the MS SQL Server using Toad for SQL,
Oracle execution time = 84.998 seconds
MSSQL execution time = 0.0051 seconds
SELECT
*
FROM Orderdetail@"DB" where "ItemNumber" = 10242
Qlemo
Can you execute the query on MSSQL without the double quotes?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
futureDBA
ASKER
yes, in mssql (via toad) I can do
SELECT * FROM Orderdetail where itemnumber = 10242
Qlemo
Then I guess you have issues with the dblink, using ODBC. Then you might want to switch to Ole DB, which can use Native Driver, and allows for better support of datatypes and objects.
hsolesql, which is the corresponding application (to be used in the PROGRAM section of the HS listener file), is desupported meanwhile, but can be used nevertheless. You have to create a .UDL file containing:
Then create a hs/admin/init«OLE-SID».ora file as copy of the corresponding template in that folder (renaming your ODBC one, of course), and enter the full path and name of above UDL file with forward slashes.
More info about the "old" HS methods: http://docs.oracle.com/cd/B19306_01/server.102/b14232/gencon.htm
*
FROM Orderdetail where ItemNumber = 10242;
run on sql server? ItemNumber may has no indexes or you run during busy hours and something is blocking specially if the table is big.
about this one run the query in Sql server first and try do not use * -
--
also you may check this
Accessing SQL Server from Oracle with Database Gateway for ODBC (DG4ODBC)
http://www.easysoft.com/applications/oracle/database-gateway-dg4odbc.html#config