Server Audit Mystery: Filtering class_type gets Error Msg 25713

Server Audits allow filtering on certain fields. Two fields claim to be strings, yet don't accept strings for filters. Here's how I figured out filtering on object_type 🙂

Stored Procedure / Function / View / Trigger Definitions Can Be Wrong, Even If sp_rename Was Never Used

Some object definitions will be wrong after using sp_rename. But there's another way to have an out-of-sync definition that most are unaware of.

PLEASE, Please, please Stop Using Impersonation, TRUSTWORTHY, and Cross-DB Ownership Chaining

Module Signing was introduced in SQL Server 2005, and yet people are still using Impersonation and TRUSTWORTHY. This needs to stop.

Which Collation is Used to Convert NVARCHAR to VARCHAR in a WHERE Condition? (Part B of 2: “Rabbit”)

Who will win "Who's Collation is it Anyway?" Database Collation is ahead, but Column Collation isn't about to give up.

Which Collation is Used to Convert NVARCHAR to VARCHAR in a WHERE Condition? (Part A of 2: “Duck”)

Microsoft says string literals not prefixed with "N" are converted to the Code Page of the Database OR referenced column. Is that true?

Sessions, Temporary Objects, and the Afterlife

Global temp objects drop automatically when Sessions end, right? But when do they end? Think you know? Are you sure?

Line-Continuation in T-SQL

Some (or maybe most?) languages and operating system command shells allow for breaking up long lines into multiple lines (i.e. lines separated by hitting Enter / Return). This is accomplished by ending a line with a particular character that indicates that the line is not ending. For operating system shells this means that the command… Continue reading Line-Continuation in T-SQL

All New Collations in SQL Server 2017 Implicitly Support Supplementary Characters

SQL Server 2017 adds 68 new Collations, but none end with "_SC". This seems to be due to Supplementary Characters being supported by default (which is great 😺).

SQLCLR vs. SQL Server 2017, Part 6: “Trusted Assemblies” – Whitelisted Assemblies can’t do Module Signing

"Trusted Assemblies", a new feature starting in SQL Server 2017, is a means of whitelisting Assemblies that one feels pose no threat, and can be created (and used) without needing to be a) signed and b) have a corresponding signature-based Login that has been granted the UNSAFE ASSEMBLY permission. In Part 4 of this series… Continue reading SQLCLR vs. SQL Server 2017, Part 6: “Trusted Assemblies” – Whitelisted Assemblies can’t do Module Signing

Clustered Index Uniquifier Existence and Size

In SQL Server, Clustered Indexes created without the UNIQUE keyword must guarantee unique key values by adding a hidden "uniquifier". But how big is this field, and is it always there?