Timofey
Timofey

Reputation: 2518

SQL Server 2008: Parameters with T-SQL statements

I want to know if it is possible to show a parameter with some T-SQL statement.

For example, there is a PARAMETERIZATION parameter. One can set it with such statement:

SET PARAMETERIZATION FORCED

How to know parameter's status?

Upvotes: 1

Views: 115

Answers (1)

Mark
Mark

Reputation: 11750

You're looking for DATABASEPROPERTY(). Something like this:

select DATABASEPROPERTY(DB_NAME(), 'IsParameterizationForced')

Note that the possible values for SET PARAMETERIZATION xxx are SIMPLE and FORCED. This query will return 1 or 0 depending on whether the current setting is FORCED.

Upvotes: 2

Related Questions