<gh_stars>0
﻿/*  leave this
    l:see LICENSE file
    g:utility
    v:110126\s.zaglio: return all session properties
    t:select * from fn__sessionproperties()
*/
create function fn__sessionproperties()
returns table
as
return
select SESSIONPROPERTY('ANSI_NULLS') VALUE,'ANSI_NULLS' as SESSIONPROPERTY
union
select SESSIONPROPERTY('ANSI_PADDING') VALUE,'ANSI_PADDING' as SESSIONPROPERTY
union
select SESSIONPROPERTY('ANSI_WARNINGS') VALUE,'ANSI_WARNINGS' as SESSIONPROPERTY
union
select SESSIONPROPERTY('ARITHABORT') VALUE,'ARITHABORT' as SESSIONPROPERTY
union
select SESSIONPROPERTY('CONCAT_NULL_YIELDS_NULL') VALUE,'CONCAT_NULL_YIELDS_NULL' as SESSIONPROPERTY
union
select SESSIONPROPERTY('NUMERIC_ROUNDABORT') VALUE,'NUMERIC_ROUNDABORT' as SESSIONPROPERTY
union
select SESSIONPROPERTY('QUOTED_IDENTIFIER') VALUE,'QUOTED_IDENTIFIER' as SESSIONPROPERTY