Friday, February 17, 2012

Database Partial Backup

Are there any way to backup just some tables of the database instead of a full backup? Or recover just some things of a backup?

Another thing, how can I recover a database without overwriting the settings of the existent database (no changes in filenames)?

You can perform full or differential backups on the entire database, a single filegroup, or a single file. So, if you want to plan to backup only certain tables, simply create those tables/indexes on a specific file or filegroup and perform a backup on just that file/filegroup.

You can restore at the database, file, filegroup levels...in SQL 2005 you can also restore specific database pages instead of the entire database, file, or filegroup.

When you perform a restore, you have a pretty robust set of options for specifying file locations, replacement, etc. Additionally, if after the restore, some database options are reset, simply run an 'alter database' statement to reset them to the state you'd like them in. Generally speaking, most options set on a database using the 'alter database' command are reset to the state they were in at the time of the corresponding backup statement.

Take a look at the 'BACKUP DATABASE' and 'RESTORE DATABASE' documentation in SQL Books Online for more detailed information.

HTH

No comments:

Post a Comment