SQL Server Developer Center > SQL Server Forums > SQL Server Data Access > OLE DB provider "MSDAORA" for linked server "DBNAME" returned message "ORA-01476: divisor is equal to zero
Ask a questionAsk a question
 

AnswerOLE DB provider "MSDAORA" for linked server "DBNAME" returned message "ORA-01476: divisor is equal to zero

  • Tuesday, August 14, 2007 4:58 PMsthompson Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

     

    Hi All,

     

    I have a strange problem with one of my Linked server connections. I am connecting from

    SQL Server 2005 Standard Edition (9.00.3042.00) to and Oracle 10g database using the Microsoft OLE DB Provider for Oracle. The connection works and I am able to select from all the Oracle tables except for 1 table. When selecting from this table I get the following error:

     

     

    OLE DB provider "MSDAORA" for linked server "DBNAME" returned message "ORA-01476: divisor is equal to zero".

     

    Msg 7330, Level 16, State 2, Line 1

    Cannot fetch a row from OLE DB provider "MSDAORA" for linked server "DBNAME".

     

     

     

    This probem happens if the table has rows or has no rows (empty table).

     

    I have tried SELECT * and count(*) along with selecting a specific column from the table.

     

    I can use SQL*plus from the system that the SQL database server running on it and select from the table using the same login/password that the linked server uses to  rule out a permissions problem.

     

    Any suggestions on what I can try next?

     

     

    Thanks.

     

Answers

All Replies

  • Wednesday, August 15, 2007 7:21 AMAnton Klimov - MSFTMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Did you try using Oracle's own oledb provider? MSDAORA is a legacy provider and not officially supported for Oracle 10g.
  • Monday, August 20, 2007 12:30 PMsthompson Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Yes I had tried that. Found the solution that worked for me:

     

    Provider: used the Oracle Provider

    Product name: Oracle

    Data source: The database name in TNSNames.ora

     

    And here is the important part. Under the Provider Options for the Oracle provider enable (check) the "Allow inprocess" provider option.

     

     

    Regards,

     

    Scott