patternsqlMinor
Extract data to another computer
Viewed 0 times
computerdataanotherextract
Problem
I have SQL Server 2008 R2 Express edition, and I want to export the data in that database to another computer so I can import it again in that computer.
How please?
What I have tried
Right-click in the database -> Tasks -> Export -> Set server name + password + set database source.
My problem
I found that I have to set the destination, but I didn't find the destination as a file or something like that, I just found that the destination is the same database which I am extracting the data from.
Help please, thanks in advance
How please?
What I have tried
Right-click in the database -> Tasks -> Export -> Set server name + password + set database source.
My problem
I found that I have to set the destination, but I didn't find the destination as a file or something like that, I just found that the destination is the same database which I am extracting the data from.
Help please, thanks in advance
Solution
There are a few ways to do this, some easier and safer than others. You could mess around with detaching and attaching, but I will never recommend that solution for normal cases like these. Since you have your database on SQL Server Express Edition, then it can't be larger than 10 GB. It'll be a quick and painless process to just backup the database, and jump over to your other machine and do the restore.
The Import/Export features aren't worth the hassle in this case. Backup and restore would be the easiest route.
If you're looking to only move a certain amount of data (say, a handful of tables), then I'd just as soon generate the scripts (for data and schema if that's desired). You can do this by right-clicking the database in Object Explorer, Tasks, and Generate Scripts. You'll have numerous options for this task, and you can specify a subset of objects to script out. Then you could run that script on your destination instance.
Just to reiterate, I'd do the backup/restore for the entire database copy, or generate scripts for a subset of objects.
The Import/Export features aren't worth the hassle in this case. Backup and restore would be the easiest route.
If you're looking to only move a certain amount of data (say, a handful of tables), then I'd just as soon generate the scripts (for data and schema if that's desired). You can do this by right-clicking the database in Object Explorer, Tasks, and Generate Scripts. You'll have numerous options for this task, and you can specify a subset of objects to script out. Then you could run that script on your destination instance.
Just to reiterate, I'd do the backup/restore for the entire database copy, or generate scripts for a subset of objects.
Context
StackExchange Database Administrators Q#45880, answer score: 5
Revisions (0)
No revisions yet.