In SSMS, we many of may noticed System Databases under the Database Folder. But how many of us knows its purpose?. In this article lets discuss about the System Databases in SQL Server.
Fig. 1 System Databases
There are five system databases, these databases are created while installing SQL Server.
- This database contains all the System level Information in SQL Server. The Information in form of Meta data.
- Because of this master database, we are able to access the SQL Server (On premise SQL Server)
- This database is used as a template for new databases.
- Whenever a new database is created, initially a copy of model database is what created as new database.
- This database is where a service called SQL Server Agent stores its data.
- SQL server Agent is in charge of automation, which includes entities such as jobs, schedules, and alerts.
- The Tempdb is where SQL Server stores temporary data such as work tables, sort space, row versioning information and etc.
- User can create their own version of temporary tables and those are stored in Tempdb.
- But this database is destroyed and recreated every time when we restart the instance of SQL Server.
- The resource database is a hidden, read only database that holds the definitions of all system objects.
- When we query system object in a database, they appear to reside in the sys schema of the local database, but in actually their definitions reside in the resource db.
#sql server #master system database #model system database #msdb system database #sql server system databases #ssms #system database #system databases in sql server #tempdb system database