question

Bhupendra99 avatar image
Bhupendra99 asked

when was the last time Ansi_warning was set

Hi In our production database there is an sp which was working fine till 2nd Nov 2014 and suddenly it started giving warnings that is Warning : Null value is eliminated by an aggregate or other SET operation because we Ansi_warning ON in our Production database so to resolve it we had marked as set Ansi_warning OFF in the beginning sp So can anybody tell me is there any way I can check when was the last time or by whom Ansi_warning was set
logs
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Kev Riley avatar image
Kev Riley answered
I'm not aware of being able to tell when and who turned this setting ON/OFF. `SET` statements change the currect session, so if this is happening in a stored procedure, then check your source control (you do source control your database don't you?) You can also change this behaviour at the instance level, using `sp_configure` and `RECONFIGURE` statements - both of these will be logged in the server logs. Still doesn't tell you 'who', but will tell you 'when'.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.