开发者

SQL Server 2008: How to see which option is SET for a database level

I need to know a value of options ANSI_NULLS and QUOTENT_IDENTIFIER on database level.

Which SQL statement may I use in order to see whet开发者_如何学Goher they are ON or OFF?


Care of here you can use the following to retrieve options are that on.

EXEC sp_dboption TestDB


sp_dboption will retrieve the data you want, but it's deprecated and no longer available in SQL 2012. Instead you should use sys.databases view, e.g.

select  is_ansi_null_default_on
    ,   is_ansi_nulls_on
    ,   is_quoted_identifier_on
from sys.databases where name = db_name()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜