Let an LLM query SQL Server through a restricted login, approved views, enforced row filtering, execution limits, and query auditing.
SQL SERVER – Login Experience with DEFAULT_DATABASE and MUST_CHANGE
DEFAULT_DATABASE and MUST_CHANGE shape the login experience. Tested on SQL Server 2025: the syntax that fails, and how the two lock a user out.
ALTER AUTHORIZATION on a Database: Find and Change the Owner
ALTER AUTHORIZATION on a database changes its owner, and SUSER_SNAME(owner_sid) finds the current one. This post shows why a login that owns a database cannot be dropped and how to catch an orphaned owner.
Login Database Access: List the Databases a Login Can Open
Check login database access by matching the login SID against the users of every online database. One query shows the user, the CONNECT state and the guest back door, and it needs no impersonation.
Unlock SQL Login Without Changing the Password
Unlock SQL login accounts without a new password: switch CHECK_POLICY off and on. See the lockout, the fix, and what to do when MUST_CHANGE blocks it.
Logon Storms: Protecting SQL Server From Connection Floods
Diagnose SQL Server logon storms, control connection growth, test a limited logon trigger, and preserve administrator recovery access.







