A database backup does not carry the key that opens your encrypted data. Export both keys, restore one from its file, and see why the password matters.
Pass a Table to a Stored Procedure With a Table Type
To pass a table to a stored procedure, you create a table type and declare a parameter of that type. This post builds a type, a procedure and a call that inserts three classes at once, then a call that inserts a thousand rows, and explains four common errors. Every result comes from SQL Server 2025.
Distance Between Two Points on the Earth With the geography Type
The distance between two points on the earth takes one method call once you store the points as a geography value. This post builds a small table of five US cities, turns latitude and longitude into points, and measures with STDistance in meters, kilometers and miles. It also compares the answer with a flat map formula and a sphere formula, and shows the error for swapped arguments.
Space Used by Sparse Data: How SPARSE Columns Save Bytes
Space used by sparse data depends on how many values are NULL. This post loads 100,000 coupons into a normal table and a SPARSE table, measures the row size and the pages, and finds the point where SPARSE stops paying off. It also shows that a NULL in a sparse column costs nothing, and that a value costs more than usual.







