zoukankan      html  css  js  c++  java
  • Database Files and Filegroups

    Database Files and Filegroups

    At a minimum, every SQL Server database has two operating system files: a data file and a log file. Data files contain data and objects such as tables, indexes, stored procedures, and views. Log files contain the information that is required to recover all transactions in the database. Data files can be grouped together in filegroups for allocation and administration purposes.

    Database Files

    SQL Server databases have three types of files, as shown in the following table.

    Database Files
    FileDescription
    Primary Contains startup information for the database and points to the other files in the database. Every database has one primary data file. The recommended file name extension for primary data files is .mdf.
    Secondary Optional user-defined data files. Data can be spread across multiple disks by putting each file on a different disk drive. The recommended file name extension for secondary data files is .ndf.
    Transaction Log The log holds information used to recover the database. There must be at least one log file for each database. The recommended file name extension for transaction logs is .ldf.

    For example, a simple database named Sales has one primary file that contains all data and objects and a log file that contains the transaction log information. A more complex database named Orders can be created that includes one primary file and five secondary files. The data and objects within the database spread across all six files, and the four log files contain the transaction log information.

    By default, the data and transaction logs are put on the same drive and path to handle single-disk systems. This choice may not be optimal for production environments. We recommend that you put data and log files on separate disks.

  • 相关阅读:
    C# Enum,Int,String的互相转换
    彻底弄懂css中单位px和em,rem的区别
    HTML特殊字符大全2
    网页特殊符号HTML代码大全
    HTML特殊字符大全
    收集一些特殊的符号
    jQuery 获取屏幕高度、宽度
    HTMLParser 使用详解
    C# 操作Word知识汇总
    C#编程总结(一)序列化
  • 原文地址:https://www.cnblogs.com/chucklu/p/13323739.html
Copyright © 2011-2022 走看看