SQL DBA Blog: Home

  • Column Name or Number of Supplied Values Does Not Match (Error 213)

    SQL Server error 213 means the shape of your insert does not match the table. The four causes, why naming columns does not help INSERT … EXEC, and why TRY/CATCH will not catch it.

    Read More


  • User, Group or Role Already Exists in the Current Database (Error 15023)

    🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.Related pillar: Security Msg 15023  ·  Level 16  ·  State 5 User, group, or role ‘AppUser’ already exists in the current database. ⚡Do not drop the user. ALTER USER [name] WITH LOGIN = [name]; remaps it to the login and keeps…

    Read More


  • Cannot Open Database Requested by the Login (Errors 4060 and 4064)

    🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.Related pillar: Security Msg 4060 / 4064  ·  Level 11  ·  State 1 Cannot open database “YourDb” requested by the login. The login failed. Login failed for user ‘DOMAIN\user’. Msg 4060, Level 11, State 1 ⚡Check 3 things in order: the…

    Read More


  • Cannot Open Backup Device: Operating System Error 5 (Access Is Denied)

    🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.Related pillar: Backup & Recovery Msg 3201 with OS error 5 means SQL Server cannot write the backup file. Check its service account, then verify that account has access to the share and NTFS folder. What Error 3201 Says Msg 3201…

    Read More


  • A Connection Was Successfully Established, But Then an Error Occurred During Login

    🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.Related pillar: Security The connection reached the server’s port and then died before the login was ever read, so the password is not the problem and there will be no 18456 in the error log. TCP Provider  ·  error: 0 A…

    Read More


  • SQL Server Errors: The Complete Guide

    Every entry here is a message somebody pasted into a search box while something was broken. This page exists to get you from that message to the cause quickly, which is a different job from explaining what SQL Server errors are in general. Three Steps From Message to Cause 01 Get the real message The…

    Read More


  • Compatibility Levels: What Actually Changes When You Bump It

    “Bump the compatibility level after a migration” is standard advice, and Version Upgrade Readiness already tells you which databases are behind. What that advice usually skips is what the number actually controls, and one part of it is more counter-intuitive than most people assume. This post runs a real test on a lab database to…

    Read More


  • SQL Server Management Studio (SSMS): The Complete Guide

    SQL Server Management Studio is still the tool most production DBAs live in day to day, and it has changed more in the last couple of years than the previous decade. There is a new install and update model, a different default connection security posture, and enough quality-of-life settings buried in menus that most people…

    Read More


  • SQL Server Collation: Case Sensitivity and the Cross-Database Trap

    A WHERE clause that matches rows it should not, or a join that worked yesterday and now fails with Msg 468 after a restore: both come down to collation. This covers what collation controls, a case-sensitivity test you can run, the cross-database trap, and how to fix a mismatch without changing the whole database. What…

    Read More


  • SQL Server Isolation Levels (and When to Reach for RCSI)

    Reading and Fixing a SQL Server Deadlock and Troubleshoot SQL Server Blocking both point at isolation level as part of the fix without covering what the levels actually are. This post fills that gap: what each isolation level trades off, what Read Committed Snapshot Isolation (RCSI) actually changes, and a real check of where this…

    Read More