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?

  • 3
    why dont your try it to test it yourself ? I am voting to close this question, since this is something you can try and educate yourself. BTW, you need to specify backup location as well. – Kin Shah Aug 14 '15 at 20:38
  • possible duplicate of Does .bak file also contain backup of ldf file? – Shanky Aug 15 '15 at 10:22

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.