question

artistlover avatar image
artistlover asked

Backup using maintenance plan

I need to just back up certain tables not the entire database. Can anyone tell me how to do this.
backup
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sqlaj 1 avatar image
sqlaj 1 answered
If you don't want the entire database you could use the following. > SELECT * INTO dbo.buTableName FROM > dbo.tableName Look at this reference for more details. http://www.w3schools.com/sql/sql_select_into.asp
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image
ThomasRushton answered
What you could do is put those particular tables onto a separate data filegroup, and just back that up. Look at the [BACKUP][1] statement documentation for how to backup particular files/filegroups; and at the [CREATE TABLE][2] statement documentation for how to create a table on a particular filegroup. [1]: http://technet.microsoft.com/en-us/library/ms189906.aspx [2]: http://technet.microsoft.com/en-us/library/ms174979.aspx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image
Grant Fritchey answered
The real problem isn't backing up only certain tables. It's restoring only certain tables. While you can put them into a filegroup on their own and back that up, restoration can be a bear. If you really only, ever, need certain tables backed up, you might be better off looking at simply exporting them to a file. In general though, you'd be much better off getting full backups because recovery is so much easier. What is the business requirement you're attempting to meet?
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.