ANSI_WARNINGS

  • Hi,

    Can anyone tell me the what is happening. The problem is: A very simple statement i.e 'IF ISNULL(@VAR1,0)>0' is showing 550-771 CPU and Duration time. After some digging I found that if I remove SET ANSI_WARNINGS OFF (necessary to stop null aggregate message) from my sp the time reduces to 0.

    I am using SQL Sever 7 SP3

  • Doing that myself time is 0 but how are you determining the CPU and Duration time. Also are you sure nothing else was going on. Plus how being is your data and what else are you doing?

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • I get times(CPU, Duration) from SQL Profiler. The thing is happening in an SP and it is the 1st statement after the local declarations and assignments. I also checked it on server when there wasn't any load. The SP is quite complex but the complex part comes after this statement. I figued it out that if SET ANSI_WARNINGS OFF statement is written within the SP (and I think it shouldn't be) it causes problem but if used it before SP's CREATE statement it works fine.

    thanx for the reply.

  • Ok I will try it this way to see if I can reproduce. It would seem odd giving you troubles inside the SP.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 4 posts - 1 through 3 (of 3 total)

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