Want to see the last ran query on SQL Server 2005? This quick script uses sys.dm_exec_query_stats to list recent queries with the time each one ran.
geometry STEnvelope: A Bounding Box Includes Extra Space
geometry STEnvelope can include points outside the original shape. These two triangle tests keep envelope membership beside exact containment.
Adding a New Year Partition Before the Calendar Rolls Over
Add a new year partition before January data arrives by checking boundaries, preparing NEXT USED, splitting an empty range, and scheduling the work.
SQLAuthority News – Thank You to Blog Readers
Thank you very much to all my blog readers for reading SQLAuthority.com through 2007. I wish you the very best for the year 2008.
GROUPING SETS: Choose Nonhierarchical Subtotals Explicitly
GROUPING SETS lets me choose independent subtotal combinations instead of assuming one hierarchy. I list the groups the report needs explicitly. That can exclude detail rows while retaining summaries across different dimensions.
SQL SERVER – Change Password of SA Login Using Management Studio
How to change password of SA login using Management Studio: log in with Windows Authentication, open the SA login properties, set the new password and test it.
SQL SERVER – Difference Between Quality Assurance and Quality Control – QA vs QC
A Tea Time chat at our India office turned into a debate on Quality Assurance vs Quality Control. Here is a simple way to tell QA and QC apart.
Writing Tests for Stored Procedures
Write tests for stored procedures with arrange, act, and assert steps in T-SQL, isolated data, and a repeatable check before every change.
SQL SERVER – TRUNCATE Can’t be Rolled Back Using Log Files After Transaction Session Is Closed
Can TRUNCATE be rolled back? Inside an open transaction yes, but once the session is closed TRUNCATE can’t be rolled back using log files, while DELETE can.










