SQL Server System Defined Database

The built-in databases every SQL Server instance creates automatically.

Every SQL Server instance comes with four system databases created automatically during installation. They keep the engine running and shouldn't be modified directly, but understanding what each one does is essential for any SQL Server professional.

master

Stores instance-wide configuration: logins, linked servers, and metadata about every other database on the instance. If master is damaged, the entire SQL Server instance may fail to start.

model

Acts as a template. Every time you create a new database, SQL Server copies the structure of model into it — so any object you add to model appears in every future database.

msdb

Used by SQL Server Agent to store job schedules, alerts, and operator information, along with backup and restore history.

tempdb

A workspace recreated from scratch every time SQL Server restarts. It holds temporary tables, table variables, intermediate query results, and row versioning data used by certain isolation levels.

SELECT name, database_id FROM sys.databases
WHERE name IN ('master', 'model', 'msdb', 'tempdb');
💡 Tip: Never store user data directly in system databases — always create a separate, dedicated database for your application's tables.

Why This Matters for DBAs

  • Backing up master and msdb regularly protects instance-level configuration
  • Sizing tempdb correctly avoids performance bottlenecks under heavy load
  • Any change made to model should be intentional, since it affects every database created afterward

Ready to go beyond the basics?

Get hands-on training, live mentorship, and placement support with Uncodemy's Data Analytics Course.

Explore Data Analytics Course →