Use it to operate or troubleshoot SQL Server instances.
Microsoft SQL Server
Microsoft SQL Server is a relational database engine for Windows and Linux, managed with SSMS, sqlcmd and PowerShell (dbatools), with SQL Agent, Always On and rich DMVs.
1. Instance up and version: SELECT @@VERSION.
2. Errors: SQL Server error log (EXEC xp_readerrorlog).
3. Waits and blocking DMVs.
4. Log file growth and backups.
5. Agent jobs status.
client → TDS (1433) → auth → engine → buffer pool/log → data files
Typical failures are connecting to the wrong instance, full transaction logs caused by missing log backups or blocked truncation, broken backup chains, database recovery states, authentication mode/SPN issues and confusing AG synchronization with application reachability. Preserve the first divergent observation and repeat the same bounded verification after remediation.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Databases owns SQL Server engine semantics. Windows owns host/service/AD foundations; Storage owns physical storage; Networking owns listener/routing paths.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification workflow Verify boundary
Identify instance and database, SQL Server version/edition, authentication path and recovery model. Check database state, log reuse wait, backup chain and file free space; for availability groups verify replica role/synchronization and listener path separately.
Step 2 Failure signatures and limits Narrow the fault
Typical failures are connecting to the wrong instance, full transaction logs caused by missing log backups or blocked truncation, broken backup chains, database recovery states, authentication mode/SPN issues and confusing AG synchronization with application reachability.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
The recovery model (FULL, BULK_LOGGED or SIMPLE) decides how the transaction log is kept and what restore options exist.
Subtopic SQL Server Agent JobsSQL Server Agent runs scheduled jobs such as backups, index maintenance and data loads.
Subtopic Always On Availability GroupsAvailability Groups replicate a set of SQL Server databases to secondary replicas and provide a listener name for automatic or manual failover.
Set max server memory, check recovery models and log backups, monitor waits (sys.dm_os_wait_stats), and use Query Store for plan regressions.
SELECT * FROM sys.dm_exec_requests;— running requestspsql -c "SELECT now(), version();"— PostgreSQL reachable and versionmysql -e "SELECT NOW(), VERSION();"— MariaDB/MySQL reachable and versionsqlcmd -S <server> -Q "SELECT @@VERSION"— SQL Server reachable and version
ReferenceWhat it is1 section · depth on demand
Operating model
Microsoft SQL Server covers instance/database boundaries, services, authentication, data/log files, transaction-log behavior, recovery models, backup/restore and Always On availability concepts. The transaction log is a durability/recovery mechanism whose reuse/truncation behavior depends on recovery model and backup/replication state.
ReferenceHow it works1 section · depth on demand
In depth
Microsoft SQL Server is a relational database widely used for Windows and .NET applications, available on Windows, Linux and as Azure SQL services. Operations centre on its recovery models, backup chain, Always On availability groups and security integration with Active Directory.
| Area | Practice |
|---|---|
| Recovery model | FULL for point-in-time recovery (requires log backups); SIMPLE for non-critical databases |
| Backup | Full + differential + transaction log backups; test restores (RESTORE VERIFYONLY is not enough) |
| HA/DR | Always On availability groups, failover cluster instances, log shipping |
| Security | Windows authentication, least-privilege roles, TDE/Always Encrypted, disable sa |
| Maintenance | Index and statistics maintenance (e.g. Ola Hallengren scripts), DBCC CHECKDB |
| Monitoring | Query Store, DMVs, wait statistics |
SELECT name, recovery_model_desc, log_reuse_wait_desc FROM sys.databases;
SELECT TOP 10 wait_type, wait_time_ms FROM sys.dm_os_wait_stats ORDER BY wait_time_ms DESC;
A transaction log that keeps growing usually means missing log backups in FULL recovery or a blocked replica — check log_reuse_wait_desc.
ReferenceImportant terms & boundaries1 section · depth on demand
Scope map
- Instances and databases
- Services and authentication modes
- Data/log files
- Transaction log
- Recovery models
- Backup/restore
- Always On concepts
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: sqlcmd installed; Windows or SQL authentication as appropriate.
sqlcmd -S sql01 -E -Q "SELECT @@SERVERNAME AS server, SERVERPROPERTY('Edition') AS edition, SERVERPROPERTY('ProductVersion') AS version;"
sqlcmd -S sql01 -E -Q "SELECT name, recovery_model_desc, state_desc FROM sys.databases;"Expected output
SELECT name, recovery_model_desc, state_desc FROM sys.databases WHERE name = 'AppDb';Expected state: The application database is ONLINE with the recovery model the backup plan expects.
name recovery_model_desc state_desc
------- --------------------- ----------
AppDb FULL ONLINEFULL recovery needs regular log backups or the transaction log keeps growing; SIMPLE cannot restore to a point in time. Illustrative authored output: field layout matches the tool, values will differ in your environment.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Documentation verification: confirms the upstream model used by the Topic. It does not assert local production behavior.
Basis: https://learn.microsoft.com/en-us/sql/database-engine/sql-database-engine · confidence 92%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Microsoft SQL Server verification boundary matrix
A compact lookup separating intent, owning component state, effective state and consumer-visible outcome for Microsoft SQL Server.
| Boundary | Inspect | Healthy interpretation | Do not infer |
|---|---|---|---|
| Intent | Instances and databases | Intended object/scope is explicit and versioned where relevant | Intent is already effective |
| Owning runtime/control plane | Services and authentication modes / Data/log files | Owner accepts and reports the expected object state | Downstream dependencies are healthy |
| Effective state | Transaction log | Independent read-back matches the intended state | Every client sees the same result |
| Consumer outcome | Recovery models | The original bounded check succeeds in the same time window | Production correctness outside this scope |
Deep reference
Design & tradeoffs
Scope
Databases owns SQL Server engine semantics. Windows owns host/service/AD foundations; Storage owns physical storage; Networking owns listener/routing paths.