--Find all SQL Objects with QUOTED_IDENTIFIER set to OFF
DECLARE @Type NVARCHAR(500),
@StrSql NVARCHAR(MAX)
SET @StrSql = ''
SET @Type = '''P'', ''TR'', ''V'', ''IF'', ''FN'', ''TF'''
SET @StrSql ='SELECT
SCHEMA_NAME(schema_id) AS [Schema], Name
FROM
sys.objects
WHERE
type IN (' + @Type + ') AND
OBJECTPROPERTY(object_id, ''ExecIsQuotedIdentOn'') = 0
ORDER BY SCHEMA_NAME(schema_id),Name'
EXEC sp_executesql @StrSql
Subscribe to:
Post Comments (Atom)
Thanks.
ReplyDelete