You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Understanding SQL Server's internal architecture helps you design better databases, write more efficient queries, and troubleshoot performance issues. This lesson covers instances, system databases, the storage engine, and memory management.
An instance is a running copy of the SQL Server Database Engine:
ServerName\InstanceNamePhysical Server
├── Default Instance (MSSQLSERVER)
│ ├── master, msdb, model, tempdb
│ └── User databases
├── Named Instance (DEV01)
│ ├── master, msdb, model, tempdb
│ └── User databases
└── Named Instance (TEST01)
├── master, msdb, model, tempdb
└── User databases
Tip: Named instances are useful for running different SQL Server versions on the same machine, for example during migrations.
Every SQL Server instance has four system databases:
| Database | Purpose |
|---|---|
| master | Stores server-level configuration, logins, linked servers, and metadata for all databases |
| msdb | Stores SQL Server Agent jobs, alerts, backup history, and SSIS packages |
| model | Template for all new databases — any objects you add to model appear in every new database |
| tempdb | Temporary workspace for temp tables, table variables, cursors, and sort spills |
tempdb is recreated every time SQL Server restarts:
#local and ##global) are stored hereThe storage engine handles how data is physically stored and retrieved:
| Page Type | Contents |
|---|---|
| Data | Table rows |
| Index | Index entries (B-tree nodes) |
| Text/Image | LOB data (varchar(max), nvarchar(max), varbinary(max)) |
| GAM / SGAM | Allocation tracking (which extents are free or mixed) |
| IAM | Index Allocation Map — tracks which pages belong to a table or index |
| PFS | Page Free Space — tracks free space on each page |
SQL Server stores data in files:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.