System databases in Sql Server

 SQL Server provides several default system databases, each serving a specific purpose. Here are the main ones:

  1. master: This database stores all the system-level information for an instance of SQL Server. It includes server configuration settings, logon accounts, linked servers information, startup stored procedures, and file locations of user databases.

  2. msdb: This database is used by SQL Server Agent. It supports jobs & alerts, Database Mail Service, Service Broker, and stores the backup & restore history for the databases.

  3. model: This database serves as a template for creating other databases. When you create a new database, SQL Server copies the contents of the model database to the new database.

  4. tempdb: This database stores temporary user objects that you explicitly create like temporary tables and table variables. Also, the tempdb stores the internal objects that the database engine creates.

  5. resource: This is a read-only database that keeps system objects that are visible in every database on the server in the sys schema.

In addition to these, SQL Server also provides several predefined database-level roles. These roles are security principals that group other principals, similar to groups in the Microsoft Windows operating system. There are two types of database-level roles:

  • Fixed-database roles: These are predefined in the database and exist in each database. For example, members of the db_owner database role can manage fixed-database role membership.
  • User-defined database roles: These are roles that you can create.


Vikash Chauhan

C# & .NET experienced Software Engineer with a demonstrated history of working in the computer software industry.

Post a Comment

Previous Post Next Post

Contact Form