Sunday, March 11, 2012

Backup database and index

Just wonder is what my understanding is correct:
1) If I put database and index onto same filegroup, when I schedule a
database backup, is the index will also be backup together with the database
?
2) If I put database and index onto separate filegroups, I need to schedule
2 backup jobs: one backup for database, another job for index at the same
schedule datetime ?
Alan,
Fear not! No matter how many data files or filegroups that you have, a full
backup will preserve all the data in the database including indexes, as long
as you don't specify the filegroup or filename in the backup statement.
Indeed the same is true for transaction log and differential backups too.
e.g.
BACKUP DATABASE Northwind NwindGroup1 TO <dumpdevice> will only backup the
NWindGroup1 filegroup.
however:
BACKUP DATABASE Northwind TO <dumpdevice> backs up all files across all
filegroups.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
"Alan" <NOSPAMalan_pltse@.yahoo.com.au> wrote in message
news:%233Nt6i3qEHA.3244@.tk2msftngp13.phx.gbl...
> Just wonder is what my understanding is correct:
> 1) If I put database and index onto same filegroup, when I schedule a
> database backup, is the index will also be backup together with the
database
> ?
> 2) If I put database and index onto separate filegroups, I need to
schedule
> 2 backup jobs: one backup for database, another job for index at the same
> schedule datetime ?
>
|||Additionally , SQL Server checks for and requires that a table and index be
backed up together... Even if you put them on separate filegroups and try to
backup only one of the FGs and not both, SQL will stop you with an error
that indicates you must backup and table and all of it's indexes together.
As Mark says,, Fear not!
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Alan" <NOSPAMalan_pltse@.yahoo.com.au> wrote in message
news:%233Nt6i3qEHA.3244@.tk2msftngp13.phx.gbl...
> Just wonder is what my understanding is correct:
> 1) If I put database and index onto same filegroup, when I schedule a
> database backup, is the index will also be backup together with the
database
> ?
> 2) If I put database and index onto separate filegroups, I need to
schedule
> 2 backup jobs: one backup for database, another job for index at the same
> schedule datetime ?
>

No comments:

Post a Comment