ansi_nulls: select case when @@options & power(2, 5) > 0 then 'yes' else 'no' end;
ansi_nulls is stored with the procedure. When the procedure is executed, it runs with this value (rather than the one that is active when the procedure is executed). quoted_identifier as well. ansi_nulls (as well as that of ansi_warnings) to be set to on.