SQL Server and Oracle connectivity error

I have connected Oracle generic HS on Solaris to SQL Server 2000. Everything seems to be fine except that I can only select from tables, for example:
 select count(*) from dbo.finsdetails@IMAGINE_LINK
 SQL> /
 
   COUNT(*)
 ----------
       3169
From 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_LINK
I think the errors are from SQL Server. Do you know how I can set these options from Oracle?

    Requires Free Membership to View

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

This was first published in May 2003

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.