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?

closed as off-topic by Kin Shah, RolandoMySQLDBA, mustaccio, Vérace, Shanky Aug 15 '15 at 10:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Kin Shah, RolandoMySQLDBA, mustaccio, Vérace
If this question can be reworded to fit the rules in the help center, please edit the question.

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

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