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?
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?
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
.