您好,我是小DAI,专注于数据库管理员相关的技术问答,请问有什么可以帮您?

sp_show_options

语法


sp_show_options

示例

示例 1

显示 sp_show_options 的输出:


create procedure sp_show_options
as
select a.number, a.name
        from master.dbo.spt_values a, master.dbo.spt_values c
        where   c.type = "P"
        and a.type='N'
        and c.low <= datalength(@@options)
        and a.number = c.number
        and convert(tinyint,substring(@@options, c.low, 1)) & c.high != 0
    return (0)
go

1> sp_show_options
2> go

 number      name
 ----------- ----------------------------
            7 arithabort
            8 numeric_truncation
           13 control
           40 prefetch
           41 triggers
           42 replication
           43 replication force_dll
           48 transactional_rpc
           58 remote_indexes
           62 statement_cache
           64 proc_return_status
           65 proc_output_params

(12 rows affected)
(return status = 0)

用法

@@options – 由与服务器选项对应的位组成的数组。对于每个选项,“low”为 @@options 中的字节编号,“high”为该字节内与此选项对应的位。如果该位已设置,则输出对应选项的名称。