January 31, 2013 at 2:50 am
i want to backup only two tables from a database sql server 2008 r2 ?
January 31, 2013 at 2:54 am
Export them to a flat file - Import Export data wizard
Export them to a different database - SELECT * INTO DB1.dbo.tablename FROM DB2.dbo.tablename
Export them to backup tables in the existing database - SELECT * INTO dbo.tablename_backup FROM dbo.tablename
You cannot backup a subset of the database to a bak file, it is all or nothing.
January 31, 2013 at 4:50 am
or use the bcp utility, likely to be the fastest method.
else you are going to need a third party tool
---------------------------------------------------------------------
January 31, 2013 at 5:29 am
Thank you guys
January 31, 2013 at 5:45 am
Or, look to a third party tool like Red SQL Data Compare & SQL Compare. But you can't use the backup process to only move pieces of a database. Backup is a page level copy of the database. No opportunities there for differentiation of individual objects. The closest you can come is backing up individual filegroups which would mean having those databases separated out on those filegroups.
Disclosure, I work for Red Gate.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 31, 2013 at 5:55 am
Grant Fritchey (1/31/2013)
Or, look to a third party tool like Red SQL Data Compare & SQL Compare. But you can't use the backup process to only move pieces of a database. Backup is a page level copy of the database. No opportunities there for differentiation of individual objects. The closest you can come is backing up individual filegroups which would mean having those databases separated out on those filegroups.Disclosure, I work for Red Gate.
sorry Grant was I meant to specify Red Gate when I mentioned third party tools? 🙂
---------------------------------------------------------------------
January 31, 2013 at 6:31 am
george sibbald (1/31/2013)
Grant Fritchey (1/31/2013)
Or, look to a third party tool like Red SQL Data Compare & SQL Compare. But you can't use the backup process to only move pieces of a database. Backup is a page level copy of the database. No opportunities there for differentiation of individual objects. The closest you can come is backing up individual filegroups which would mean having those databases separated out on those filegroups.Disclosure, I work for Red Gate.
sorry Grant was I meant to specify Red Gate when I mentioned third party tools? 🙂
Ha! Don't be sorry. It's my job to do the full-throated yodel about how great Red Gate is.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply