Can secondary data file (.ndf) be created by default during sql installation?

  • 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.

     

     

     

    • This topic was modified 4 months ago by  olegserdia.
    • This topic was modified 4 months ago by  olegserdia.
    Attachments:
    You must be logged in to view attached files.
  • 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
    Problems are opportunities brilliantly disguised as insurmountable obstacles.

    How to post questions to get better answers faster
    Managing Transaction Logs

  • olegserdia wrote:

    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


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply