One of my clients recently sent me an email with the following error. The error was visible in the error log and was about the database principal.
Unix Timestamp in SQL Server: Converting Seconds and Milliseconds Both Ways
A Unix Timestamp counts seconds or milliseconds since 1 January 1970 UTC. This post converts it to datetime2 and back on SQL Server 2025, shows why datetime2(3) keeps the milliseconds, how to pass the year 2038 limit and how time zones and dates before 1970 behave.
SQL SERVER – Source Database in Restoring State
A Source Database in Restoring State can follow a tail-log backup WITH NORECOVERY. A customer encountered this while restoring another copy.
Read-Only Routing for Availability Group Replicas
Configure availability group read-only routing, listener connections, replica URLs, balanced lists, and verification after failover.
Max Server Memory Set Too Low: Fix It Through the DAC
Max server memory set too low can stop SQL Server from answering normal connections. This post shows how to connect through the Dedicated Administrator Connection, raise the value with sp_configure and start the service when it will not start.
distributor_admin Login: Why Renaming It Is a Bad Idea
Do not rename the distributor_admin login on a server that uses replication. This post shows how to check whether replication uses it, and a loopback demo with a throwaway login that shows what a rename breaks.
SQL SERVER – List of Trace Events
sys.trace_events lists available SQL trace events rather than only default-trace collection. Readers asked after my creation-date article.
SQL Express Size Limits for SQL Server 2025 and Earlier Versions
SQL Server Express Size limits depend on the engine release. The 2021 article 10 GB answer does not cover every current version.
When a Table Was Created: Find It With Metadata and Traces
To find when a table was created, read create_date from sys.tables. This post adds the default trace and an Extended Events session for the question of who created it, and tests what a rename or an ALTER does to the date.
NOCHECK CONSTRAINT: Loading Data and Trusting Foreign Keys Again
Use NOCHECK CONSTRAINT carefully, distinguish enabled from trusted foreign keys, validate old rows, and restore optimizer assumptions.










