select count(*) from dbo.finsdetails@IMAGINE_LINK SQL> / COUNT(*) ---------- 3169From a view:
SQL> select count(*) from dbo.aipview_theoreticalprices@IMAGINE_LINK; select count(*) from dbo.aipview_theoreticalprices@IMAGINE_LINK * ERROR at line 1: ORA-00942: table or view does not exist [Generic Connectivity Using ODBC]DRV_OpenTable: [DataDirect][ODBC SQL Server Driver] [SQL Server]Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query. (SQL State: 37000; SQL Code: 7405) ORA-02063: preceding 2 lines from IMAGINE_LINKI think the errors are from SQL Server. Do you know how I can set these options from Oracle?
These errors are due to the fact that the ODBC DNS definition to the SQL Server database is not defined correctly. The ANSI NULLS and ANSI WARNINGS are options that you can select for your SQL Server ODBC DNS. From there, you can select or deselect the check boxes associated with these two options. That should solve your problem.
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
This was first published in May 2003