Learn with me Microsoft SQL Server Internals (3.2)

Source: Internet
Author: User
Tags management studio

Directory

      • Directory
      • Correct understanding of SQL Server database files
      • Create a database
      • Resources

Correct understanding of SQL Server database files

The MS SQL Server database file can be divided into the following 2 categories:

Data file (. mdf or. ndf)
Transaction log file (. ldf)

"Data Files" can be divided into: Master data Files (Primary. mdf) and secondary data files (secondary. ndf)

We can view information about database files through the catalog view sys.database_files

--查看数据库文件相关信息select * from sys.database_files

Note: SQL Server is internally identified by a logical name, while storage uses a physical name.
The logical and physical names are consistent by default.

Create a database

There are 2 ways to create a SQL Server database:

  1. Create with Management Studio graphics
  2. Created by the CREATE DATABASE statement

Note:the user database for SQL Server is created based on the system database model, so modifying the model database may affect the creation of the user database .

In addition, when creating a database, it is recommended that you modify the parameters for automatically growing data files.

Resources

1. Microsoft SQL Server Internals-Chapter 3

Update by Hyperwang at 2016/05/25

Learn with me Microsoft SQL Server Internals (3.2)

Related Article

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.