SQL DBA Blog: Home

  • Creating SQL Logins on an Availability Group (AG) Environment

    In an Availability Group, the databases fail over. Your SQL logins do not. For Windows domain logins, the SID is owned by AD, so you just create the login on each replica and it syncs up. For SQL logins, the SID is generated inside SQL Server. If the SID differs between replicas, the database user…

    Read More


  • Grant VIEW SERVER STATE in SQL Server

    🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.In: Security Msg 300  ·  Level 14  ·  State 1 The user does not have permission to perform this action. VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’. Msg 300, Level 14, State 1 ⚡GRANT VIEW SERVER STATE…

    Read More


  • How to Get the SQL Server IP Address

    When troubleshooting connectivity, firewall rules, or unexpected routing, you often need one simple answer: which IP address and port did my session actually connect to? SQL Server can listen on multiple IPs (and listeners can resolve to multiple addresses), so the hostname in your connection string does not always tell you what you really hit.…

    Read More


  • SQL Server Error Severities Explained

    🔍 Looking for a specific error? This page explains what the severity number is telling you and how urgently to react. If you have an actual error message in front of you, the SQL Server Errors Complete Guide has a searchable index of every error covered on this site. Find your error → When SQL…

    Read More


  • How to Right-Size SQL Server Database Files

    Auto-growth is not the problem. Unplanned, reactive growth is. When database files are undersized, SQL Server is forced to extend them repeatedly under load. Each growth event introduces a pause. If those pauses occur during peak workload, they can cause noticeable latency, increased I/O pressure, and in some cases application timeouts. Right-sizing database files is…

    Read More


  • SQL Server: ALTER DATABASE SET ENABLE_BROKER Taking a Long Time (Fix)

    After a recent Availability Group failover, Database Mail stopped sending emails. On investigation, the underlying cause was Service Broker not being enabled on the system database required by Database Mail. To confirm the status, I ran: The is_broker_enabled column was returning 0, indicating that Service Broker was disabled for that database. I then attempted to…

    Read More


  • SQL Server: Ad hoc Update to System Catalogs is Not Supported (Fix)

    While enabling show advanced options using sp_configure, I encountered an unexpected failure when executing RECONFIGURE: The change would not apply, and any further configuration attempts failed in the same way. This issue typically appears on systems where older configuration settings have been modified and never reset. In most cases, the root cause is the legacy…

    Read More


  • How to Kill a SPID in SQL Server

    In SQL Server, every connection to the database engine is assigned a Session Process ID, commonly known as a SPID. There are situations where you may need to kill a SPID in SQL Server. This typically occurs when a session is blocking other queries, running indefinitely, holding locks during maintenance, or preventing a database from…

    Read More


  • How to Check Blocking SPIDs in SQL Server

    Blocking is one of the most common causes of performance issues in SQL Server. When one session holds a lock on a resource and another session needs that same resource, the second session waits. If that wait persists, users experience slowness. Understanding how to quickly identify blocking SPIDs is a core DBA skill. This guide…

    Read More


  • Open SSMS as a Different Domain User

    🛠️Part of the SSMS Complete Guide, installing, configuring and fixing SQL Server Management Studio. When working in corporate SQL Server environments, you will often need to connect using a different Active Directory domain account. Common reasons include: SQL Server Management Studio (SSMS) does not allow switching users inside the connection dialog. To connect as another…

    Read More