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
  • 94,921
  • 30
  • 437
  • 687
Diego Flores
  • 459
  • 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
  • 94,921
  • 30
  • 437
  • 687
SQLRockstar
  • 6,355
  • 27
  • 48