A restore from LDF file only is not possible, because a log holds changes and not the database. This post answers five common questions, shows the error SQL Server gives, and restores a database from a full backup, a log backup and a tail-log backup.
Second Identity Column Workaround: Computed Column or Sequence
A SQL Server table can have only one identity column, and a second one fails with Msg 2744. This second identity column workaround compares a computed column with a sequence, shows what each does with gaps, rollbacks and large values, and explains when to pick which.
Kill a Running Shrink: Is It Safe to Stop DBCC SHRINKFILE?
You can kill a running shrink with KILL and the database stays safe. This post starts a shrink on a test database, stops it from a second window, checks the data and the file afterwards, and shows that the shrink itself, not the kill, is what fragments the table.
Partition Function Fanout: Count Partitions in SQL Server
Count partitions in SQL Server by reading the fanout of a partition function. This post reads fanout and modify_date from sys.partition_functions, watches SPLIT RANGE and MERGE RANGE change them, and finds functions that no table uses.
SQL SERVER – Rows Sampled – sys.dm_db_stats_properties
Here is the question asked in my yesterday’s Comprehensive Database Performance Health Check about rows sampled from sys.dm_db_stats_properties.
SQL SERVER – Statistics Modification Counter – sys.dm_db_stats_properties
The Statistics Modification Counter tracks changes relevant to each statistics object. I inspect it alongside the affected query and estimates.
Can a Database Have Multiple Files with Extension MDF? – Interview Question of the Week #279
Question: Can a Database Have Multiple Files with Extension MDF?
Answer: Yes. It is possible to have multiple files with extension MDF.






