Functions of SQL Server System Database

Source: Internet
Author: User
Welcome to the Windows community forum and interact with 3 million technical staff to access the SqlServer system database, which includes master, model, msdb, and tempdb. These four databases perform their respective duties in SQLServer as R & D personnel, we need to understand the responsibilities of these databases. Let's take a look at these databases. 1. Master

Welcome to the Windows community forum and interact with 3 million technical staff> the system databases that enter SQL Server include master, model, msdb, and tempdb. These four databases perform their respective duties in SQL Server, as a R & D engineer, you need to understand the responsibilities of these databases. Let's take a look at these databases. 1. Master

Welcome to the Windows community forum and interact with 3 million technicians>

The system databases of SQL Server are divided into master, model, msdb, and tempdb. These four databases perform their respective duties in SQL Server. as R & D personnel, you need to understand the responsibilities of these databases, let's take a look at the effects of these databases. 1. Master database

The Master database records all system-level information of the SQLServer System (Table sysobjects ). He recorded all the logon accounts (Table sysusers) and system configuration. The Master database is such a database, which records all other databases (Table sysdatabases) and collects the location of database files. The Master database records the initialization information of SQLServer, which always points to an available latest Master database backup.

2. Model database

A Model database is a template used to create databases on the system. When the system receives the "Create DATABASE" appeal, the content of the first Department of the DATABASE to Create a tree is copied from the Model DATABASE, and the remaining department is filled with blank pages. Therefore, the Mode DATABASE must be included in SQL Server data.

3. Msdb Database

The Msdb database is used by SQLServer agents to adjust warnings, lessons, and operators. For example, if we have backed up a database, we will insert an identification Table Mark record in the table backupfile to record the relevant backup information.

4. Tempdb Database

The Tempdb database retains the tables and stored procedures that occur during system operation. Of course, it also satisfies other storage requirements, such as retaining the storage class generated by SQL Server. The Tempdb database is a global consulting service. Any user connected to the system can create tables and stored procedures in the database. The content of the Tempdb database is cleared every time the SQL Server is started. Therefore, the table is cleaned every time the SQL Server is started. The table and stored procedure will be automatically removed after the connection is closed, and there will be no activity after the system is blocked, NO content in the tempdb database will be retained from a session of SQL Server to this session.

By default, the tempdb database is automatically added when SQL Server is running as needed. However, unlike other databases, each time the database engine is started, it is reset to its initial size. If it is not beautiful, the size of the tempdb database is small, then each time you start SQL Server from the beginning, automatically adding the size of the tempdb database to the size required to support the workload may become part of the system's workload. To avoid this overhead, you can use alter database to add the details of the tempdb DATABASE.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.