Timofey
Timofey

Reputation: 2508

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 whether they are ON or OFF?

Upvotes: 2

Views: 67

Answers (2)

Rory
Rory

Reputation: 41827

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()

Upvotes: 0

ta.speot.is
ta.speot.is

Reputation: 27214

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

EXEC sp_dboption TestDB

Upvotes: 1

Related Questions