What are NDF Files?

SqlSql Server

Sql Problem Overview


SQL Server uses MDF for data files and LDF for log files, but what are NDF files?

Whats the benefits of these files?

Sql Solutions


Solution 1 - Sql

From Files and Filegroups Architecture

Secondary data files

Secondary data files make up all the data files, other than the primary data file. Some databases may not have any secondary data files, while others have several secondary data files. The recommended file name extension for secondary data files is .ndf.

Also from file extension NDF - Microsoft SQL Server secondary data file

See Understanding Files and Filegroups

> Secondary data files are optional, are > user-defined, and store user data. > Secondary files can be used to spread > data across multiple disks by putting > each file on a different disk drive. > Additionally, if a database exceeds > the maximum size for a single Windows > file, you can use secondary data files > so the database can continue to grow. > > The recommended file name extension > for secondary data files is .ndf. >

/ > For example, three files, Data1.ndf, > Data2.ndf, and Data3.ndf, can be > created on three disk drives, > respectively, and assigned to the > filegroup fgroup1. A table can then be > created specifically on the filegroup > fgroup1. Queries for data from the > table will be spread across the three > disks; this will improve performance. > The same performance improvement can > be accomplished by using a single file > created on a RAID (redundant array of > independent disks) stripe set. > However, files and filegroups let you > easily add new files to new disks.

Solution 2 - Sql

> Secondary data files are optional, are user-defined, and store user data. Secondary files can be used to spread data across multiple disks by putting each file on a different disk drive. Additionally, if a database exceeds the maximum size for a single Windows file, you can use secondary data files so the database can continue to grow.

Source: MSDN: Understanding Files and Filegroups

The recommended file name extension for secondary data files is .ndf, but this is not enforced.

Solution 3 - Sql

An NDF file is a user defined secondary database file of Microsoft SQL Server with an extension .ndf, which store user data. Moreover, when the size of the database file growing automatically from its specified size, you can use .ndf file for extra storage and the .ndf file could be stored on a separate disk drive. Every NDF file uses the same filename as its corresponding MDF file. We cannot open an .ndf file in SQL Server Without attaching its associated .mdf file.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNasser HadjlooView Question on Stackoverflow
Solution 1 - SqlAdriaan StanderView Answer on Stackoverflow
Solution 2 - SqlDaniel VassalloView Answer on Stackoverflow
Solution 3 - SqlJason ClarkView Answer on Stackoverflow