Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Here is how the ERRORLOG led me to the cause.
How to Change Owner of Database in SQL SERVER? – Interview Question of the Week #117
How do you change owner of a database in SQL Server? Three ways, including ALTER AUTHORIZATION, which I prefer, and the deprecated sp_changedbowner.
SQL SERVER – Query to Get the List of Logins Having System Admin (sysadmin) Permission
Many scripts online miss logins when listing sysadmin members. Why the common query is wrong, plus a correct one for logins with System Admin permission.
SQL SERVER – TDE Effects on TempDB’s Slow Performance
A client had slow performance out of nowhere. The cause was TDE effects on TempDB after someone tested encryption on production. Here is what I learned.
Why an Encrypted Column Shows NULL on a Subscriber
An encrypted column shows NULL on a subscriber when the subscriber’s symmetric key doesn’t match the publisher’s key. This post reproduces the symptom with two demo databases, compares key_guid in both and shows the fix. It also explains what replication copies and what it leaves behind.






