A quick T-SQL method using LEN and REPLACE to count the occurrence of character or word in a string, written as a hint for TSQL Beginners Challenge 14.
Synchronizing Data Between Two Databases
Synchronizing data between two SQL Server databases requires a latency target, change source, conflict rule, and recovery plan before tool selection.
geometry MakeValid: Repair Can Change the Geometry Type
geometry MakeValid returns a valid geometry from an invalid instance, but the result can change type. I keep the original beside the proposed repair. A validity flag alone does not describe everything that changed.
SQL SERVER – Computed Column and Performance – Part 3
Part 3 of my series on computed column and performance shows how an index improves the performance of a computed column. Read the earlier parts first.
SQL SERVER – SHRINKDATABASE For Every Database in the SQL Server
A query tuning visit turned into a lesson on why running SHRINKDATABASE for every database is a bad idea. Here is what happened at the client’s office.
Random Tokens in SQL Server: Generation, Storage and Expiry Checks
Random tokens in SQL Server need more than a generated value. Their stored state must define expiry, revocation and whether consumption already occurred. A guarded disposable fixture makes the boundary conditions explicit.
SQL SERVER – Best Practices for DBA Before Taking Vacation
Why is it so hard for a DBA before taking vacation to relax? For T-SQL Tuesday I share my best practices, starting with the hardest: do not think about your job.







