Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection

  • I am executing stored procedure using linked server and getting error

    "Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection"

    I've change my procedure and included

    SET ANSI_WARNINGS ON

    SET ANSI_NULLS ON

    but then i am getting error "Divide by zero error encountered."

    The procedure works fine without linked server. Could you please suggest how to avoid error "Divide by zero error encountered."

  • Some operation within your code is attempting to perform math functions and it's dividing by zero. You need to determine which field is causing the problem. Without your code, data, or structure, it's going to hard to do it remotely.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply