2

If I have two files in my database (mdf & ndf), when I do a backup of the database with the statement:

backup database mydb;

are both the two files are backed up?

Paul White
  • 83,961
  • 28
  • 402
  • 634
Diego Flores
  • 449
  • 2
  • 7
  • 15

1 Answers1

10

Yes. Details here: Backup Overview (SQL Server)

This is the section relevant for you:

  • Full backup

    A full backup contains all the data in a specific database or set of filegroups or files, and also enough log to allow for recovering that data.

You should always test the backup (ideally by performing a restore to another location) to ensure you can recover your data in the event of a disaster.

Paul White
  • 83,961
  • 28
  • 402
  • 634
SQLRockstar
  • 6,359
  • 26
  • 48