January 21, 2022 at 10:29 pm
Primary data file, sitting on its own drive, has two files: .mdf and .ndf.
Same Primary filegroup.
SQL Server sits on RAID(redundant array of independent disks).
From what I understand by default sql server only creates one primary file (.mdf) and log file (.ldf).
IT guy, who installed sql server, said that he did not manually create .ndf file.
So, can sql server create .ndf file by default (automatically)?
If yes, based on what the size of the .ndf file was determined, since it's completely different compared to primary .mdf file.
January 22, 2022 at 4:35 pm
SQL Server installation only creates the system databases - it does not create any user databases. The user database in your picture was either created through another script executed after the installation - or by performing a restore from a backup.
Most likely this was done as a restore - and the source database for that backup has 2 data files, so when it was restored there were 2 data files created.
So - no, SQL Server does not automatically create a secondary file.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
January 23, 2022 at 1:35 am
If yes, based on what the size of the .ndf file was determined, since it's completely different compared to primary .mdf file.
A secondary file typically contains a subset of what used to be in the PRIMARY. For example, someone decided that they wanted a table to live in a separate file in a separate file group. Another reason can be that the database has full text enabled and they put that in a secondary.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply