What is meant by LDF and MDF
2012-02-26 07:46
357 查看
Q:
What is mean by LDF and MDF?
Bryan Oliver says:
From Microsoft themselves:
Physical Database Files and Filegroups
Microsoft® SQL Server maps a database over a set of operating-system files. Data and log information are never mixed on the same file, and individual files are used only by one database.
SQL Server databases have three types of files:
Primary data files
The primary data file is the starting point of 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 data files
Secondary data files comprise all of the data files other than the primary data file. Some databases may not have any secondary data files, while others have multiple secondary data files. The recommended file name extension for secondary data files is .ndf.
Log files
Log files hold all of the log information used to recover the database. There must be at least one log file for each database, although there can be more than one. The recommended file name extension for log files is .ldf.
SQL Server does not enforce the .mdf, .ndf, and .ldf file name extensions, but these extensions are recommended to help identify the use of the file.
In SQL Server , the locations of all the files in a database are recorded in both the master database and the primary file for the database. Most of the time the database engine uses the file location information from the master
database. For some operations, however, the database engine uses the file location information from the primary file to initialize the file location entries in the master database.
SQL Server files have two names:
logical_file_name is a name used to refer to the file in all Transact-SQL statements.
The logical file name must conform to the rules for SQL Server identifiers and must be unique to the database.
os_file_name is the name of the physical file.
It must follow the rules for Microsoft Windows NT® or Microsoft Windows® Me, and Microsoft Windows 98 file names.
Technorati Tags:
FROM:http://sqlserverpedia.com/blog/sql-server-tutorial/what-is-meant-by-ldf-and-mdf/
What is mean by LDF and MDF?
Bryan Oliver says:
From Microsoft themselves:
Physical Database Files and Filegroups
Microsoft® SQL Server maps a database over a set of operating-system files. Data and log information are never mixed on the same file, and individual files are used only by one database.
SQL Server databases have three types of files:
Primary data files
The primary data file is the starting point of 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 data files
Secondary data files comprise all of the data files other than the primary data file. Some databases may not have any secondary data files, while others have multiple secondary data files. The recommended file name extension for secondary data files is .ndf.
Log files
Log files hold all of the log information used to recover the database. There must be at least one log file for each database, although there can be more than one. The recommended file name extension for log files is .ldf.
SQL Server does not enforce the .mdf, .ndf, and .ldf file name extensions, but these extensions are recommended to help identify the use of the file.
In SQL Server , the locations of all the files in a database are recorded in both the master database and the primary file for the database. Most of the time the database engine uses the file location information from the master
database. For some operations, however, the database engine uses the file location information from the primary file to initialize the file location entries in the master database.
SQL Server files have two names:
logical_file_name is a name used to refer to the file in all Transact-SQL statements.
The logical file name must conform to the rules for SQL Server identifiers and must be unique to the database.
os_file_name is the name of the physical file.
It must follow the rules for Microsoft Windows NT® or Microsoft Windows® Me, and Microsoft Windows 98 file names.
Technorati Tags:
FROM:http://sqlserverpedia.com/blog/sql-server-tutorial/what-is-meant-by-ldf-and-mdf/
相关文章推荐
- What is meant by Primary Index and Secondary Index
- BW:What is meant by Primary Index and Secondary Index
- What is the Differences Between Sleep/Standby and Hibernate
- What is meant by 'Bounce' the database
- What is meant by Asymmetrical protocols?
- What is SaaS and why you should you care? by Dennis Stevenson | May 12, 2009
- What is meant by back propagation in an ANN compared to a biological neural network?
- In Linux, what is the difference between “buffers” and “cache” reported by the free command?
- What exactly is the difference between “pass by reference” in C and in C++?
- C++ Memory Management : What is the difference between malloc/free and new/delete?
- The good life is one inspired by love and guided by knowledge
- What is Event Driven Architecture (EDA) and Why Does it Matter EDA 摘要
- EIT: where is it now and what lies ahead?
- what is the difference between MirrorView, SanCopy, SanpSure and SnapView
- Introduction to COM - What It Is and How to Use It.
- [POST] What Is the Linux fstab File, and How Does It Work?
- ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate
- 解决方案: the selected file is a solution file but was created by a newer version of this application and cannot be opened
- Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.
- What the hell is mon and mun?