Why would you use a .NDF file?

  • Our primary SQL Server here today had a major hardware failure.  Unfortunately, it was a poorly timed hardware failure - most of yesterday's data had just missed the backups.  Luckily, we were able to get the data copied from what might be the failing drive (still uncertain which drive is giving us problems) - and I looked at our databases from a plain old Windows Explorer perspective, as opposed to the Enterprise Manager view I visit every day.

    Anyhow, all but one of our databases on the server are setup as .MDF and .LDF, for the database and its logs respectively.  But our main database has a .MDF, .LDF, .NDF, and another .LDF that goes with the .NDF.  I decided to try to restore the database to our test server, and that's when I noticed that it asked for the .NDF file.

    I did some searching on line to find out that a .NDF is a secondary data file.  However, I'm not too sure how it was applied to the database.

    So I have to ask you database experts out there - in what situation(s) would use a .NDF file?  Is there an advantage to having a secondary data file? 

     

  • For performance reasons you might want to. For instance, if you have several sets of drives and you know what data you want to segregate because they get hit concurrently, you could spread data files across those those drives.

    K. Brian Kelley
    @kbriankelley

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

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