Login failed for user with state 58? Newer SQL Server versions give better details in the ERRORLOG. Here is how to FIX Error 18456 when you see this state.
Add a User Across Databases: A Tested Script With Cleanup
To add a user across databases you need one login and, in every chosen database, a user and a role. This post gives a tested script that does it, checks it and removes it again on SQL Server 2025. It also answers the model database question and shows the server-level shortcut.
Linked Server Logins: Stop Mapping Everyone to sa
Audit linked server logins for blanket remote sysadmin mappings, test with a low-privilege identity, and replace broad access safely.
Reading Connection Details in Code: APP_NAME, HOST_NAME and Logins
An audit row blamed the wrong machine because a label was treated as proof. Here is which connection values you can trust, and which you cannot.
Finding Databases Owned by Personal Logins and Fixing Them
Find databases owned by personal logins, review an approved replacement owner, and test dbo mapping and execution-context effects.







