Protecting files and filegroups

If your plan to protect SQL Server includes backups of files and filegroups, then the database must use the full or bulk-logged recovery model. In addition, you must maintain the unbroken sequence of transaction log backups. You must create the files and filegroups for your databases and place individual database components into them. NetBackup places a restriction on the layout of your database so it can successfully perform backups and restores of database files and filegroups.

Before you try a file backup or filegroup backup, you must ensure that no table is placed into a filegroup. That filegroup is different than any one of its indices.

For example, the layout as indicated by the following Transact SQL statements should not be used:

use master
CREATE DATABASE MultiFileDB
ON
PRIMARY ( NAME = FileX,
		FILENAME = 'd:\mssql\data\FileX.mdf'),
FILEGROUP AltGroup
( NAME = AltGroupFil,
  FILENAME = 'd:\mssql\data\AltGroupFil.ndf') 
GO
use MultiFileDB
CREATE TABLE Table1 (col1 char(10),col2 char(10), col3 char(10)) on AltGroup
go
create unique clustered index index4 on Table1 (col2)
go

Notice in this example, Table1 has been placed in filegroup AltGroup but its index is placed (by default) in the primary filegroup.

If you do place a table into a different filegroup than one of its indices and use NetBackup for SQL Server to back it up, you may fail. The following SQL Server error message is displayed:

Database file <file name> is subject to logical recovery and 
must be among the files to be backed up as part of the file 
or filegroup backup.