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?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityIf 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?
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.