Need to see the value of set option NUMERIC_ROUNDABORT for all the sessions

  • Hi all

    I have a database that I want to add filtered index to it. While working with filtered index there are some set options that must be used by all the clients. If some of them won't be using the required set options, they won't be able to modify the data in the table that has the filtered index. In order to check if we have any clients that don't use the needed set options, I wanted to have a job that checks the sessions' set options in sys.dm_exec_sessions and if it finds problematic sessions, it will write there details into a log table. The problem is that sys.dm_exec_sessions don't have any information about NUMERIC_ROUNDABORT option. The function sessionproperty can show the setting of NUMERIC_ROUNDABORT only for the session that is running the function. Can anyone tell me how can I find out this setting for all the sessions?

    Thank you for your help.

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • I would not lose sleep over that unless you really know that SET NUMERIC_ROUNDABORT ON is actually in sway in your organisation. The OFF setting is the default, and I have seen it much in use since 1996 (when I worked with a system where it was all over the place).

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • Thank you for your response. My main concern is because few years ago I didn't do check it properly and ended up disabling one of the application. Wouldn't want to repeat the same mistake twice (but have to admit that it was not because of numeric_roundabort's setting).

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Oh, I've also caused an outage by adding a filtered index. But the system I work with a product and we make clear what we support and not. Turned out the customer had an outdated version of a DLL which connected with the wrong settings.

    And any use of the wrong settings for ANSI_NULLS etc is an accident waiting to happen.

    You have checked sys.procedures for procedures with bad settings, haven't you?

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • I've checked it with sys.sql_modules. Was surprised to find 2 procedures with the wrong setting options. Those procedures have nothing to do with the tables that I want to add the filtered index on them, and in fact I'm not even sure that they are still being used by any of the applications that work with the database.

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • If your database hails from the SQL 2000, you should not be surprised to find procedures with correct settings, as Enterprise Manager in SQL 2000 had it wrong.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

Viewing 6 posts - 1 through 5 (of 5 total)

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