Before you KILL a session, inspect its transaction age, log bytes, current command, and likely rollback work, then monitor the undo safely.
Hide Procedure Code in SSMS: What WITH ENCRYPTION Covers
To hide procedure code, create the procedure WITH ENCRYPTION. A demo shows what the clause blocks: the text, the definition and the plan. It also shows the ALTER trap that unhides a procedure, and why this is obfuscation and not security.
Digits in a Column: A CHECK Constraint for Digits Only
To keep only digits in a column, a CHECK constraint with NOT LIKE and a character range works, but it has two holes. It accepts an empty string and digits from other scripts. A demo closes both and shows NULL, trust and fixed length codes.
ALTER SCHEMA TRANSFER: Move a Table to Another Schema
ALTER SCHEMA TRANSFER moves a table to another schema and leaves repairs behind. A demo shows that permissions disappear and views break while the data stays. It also shows a synonym that keeps old queries working.
LTRIM and RTRIM With Custom Characters in SQL Server 2022
Use LTRIM and RTRIM with custom characters in SQL Server 2022, understand character sets, test TRIM directions, and preserve valid text.
Search a Query Plan for a Table: Find Node and XQuery
Search a query plan for a table with the Find Node feature in SSMS, or with XQuery over the plan XML. A demo query reads one table twice, and both methods find both visits. The post also shows how to save a plan file for later.
Transactions and Variables – SQL in Sixty Seconds #150
Transactions and Variables both are not related at all. There is no impact of a transaction on a variable. Let us learn about it today.







