• Hugo Kornelis (10/8/2012)


    However, much more important - your statement is incorrect. SSMS does not use the server defaults. If you run a profiler or XEvents trace while working in SSMS, you'll see that each connection emits a series of SET statements when it's opened. These settings are controlled in the Tools / Options / Query Execution / SQL Server / Advanced and ANSI dialogs for new query windows, or in the Query / Query Options / Advanced and ANSI dialogs for already opened query windows.

    OK, I should have said that if you haven't donme anything to the server defaults (or have only done what I suggetsed as part of installation) and haven't changed SSMS behaviour from its default using the dialogs you mention, then the settings of the several options needed for indexed views are all present in the server defaults and also in a connection made by SSMS. I over-simplified.

    Note Microsoft's clear recommendations:

    If you are using an OLE DB or ODBC server connection, the only value that must be modified is the ARITHABORT setting. All DB-Library values must be set correctly either at the server level by using sp_configure or from the application by using the SET command.

    and

    We strongly recommend that the ARITHABORT user option be set server-wide to ON as soon as the first indexed view or index on a computed column is created in any database on the server.

    both on the BoL page referenced by Ron. My recommendation to set it all server-wide on installation is slightly stronger, but I think it's in the same spirit; and I don't think MS would have made the recomendation if they didn't think it would work.

    Tom