• Radu Costescu (1/25/2013)


    If I execute this s/p, either from calling application code, or from Query Analyzer (exec ...), it take very much time to execute (1.5 - 2 hours).

    But if I directly execute the s/p code from Query Analyzer, the result come almost instantly (5-10 seconds).

    What exactly are you checking from query analyzer ? Running the procedure with parameters or the code inside the procedure ?

    If the code inside the procedure is running perfectly and procedure not, then try recompiling the procedure and check the result.