In this post I demo two PoCs for SQL injection vulnerabilities fixed in SQL Server 2022 CU20 GDR KB5063814. This August’s Patch Tuesday came with a security patch for SQL …
T-SQL
-
-
There’s this weird misconception floating around LinkedIn and reddit that SQL Server CTEs somehow store results in either memory or tempdb. This is wrong and whoever states that CTEs store …
- ScriptsSQL Server
Script to reseed out-of-sync sequences used for default constraints
by Vlad DrumeaThis is a script that I wrote to help me next time I might need to bulk reseed out-of-sync SQL Server sequences tied to default constraints. Setting the scene Someone, …
- PerformanceSQL Server
Does Query Store plan forcing work on queries using the RECOMPILE hint?
by Vlad DrumeaIt’s 3AM and I’m curious if Query Store plan forcing works on queries that use the RECOMPILE hint (aka OPTION(RECOMPILE) ).So might as well make a blog post out of …
-
If you’ve ever been curios about ways to view SQL Server system objects’ definitions, to see what your favorite system objects do behind the scenes then this blog post is …
-
In this post I demo a script I put together to count NULLs in all columns of a given table in SQL Server and store the results in a table. …
-
This is a brief post containing a query that lists object dependencies in SQL Server for either a specific object or for the entire database. Intro Figuring out object dependencies …
-
In this post I demo a query to get connection information in SQL Server aggregated by database, host, client and login name. Intro I’ve spent some time this week working …
- SQL ServerTips And Tricks
Dangerous SET options stored procedure inherit from your session
by Vlad DrumeaIn this post I cover ANSI_NULLS and QUOTED_IDENTIFIER, two potentially dangerous SET options that stored procedures inherit from your session when created. Intro You might have noticed when scripting out …
-
This post demos a script I put together to help move SQL Server database files to another drive and folder by generating PowerShell and T-SQL commands. I’ve decided to make …