Exporting Selected tables from a SQL Database
Many times we run into a requirement when we have to export few tables from a database. Now it could be for sharing that information with someone else or sending it to the support guys. One of the easiest way to achieve same is by using SQL Import and Export Wizard.
Following is a walkthrough of exporting selected tables from a SQL database. (we would be exporting few tables from Northwind database). By following the below mentioned steps we would end up with a new database with only our selected tables.
Connect to the SQL instance using SQL Management Studio which has the database from which we need to export tables.
Select database > Tasks > Export Data
This would launch ‘SQL Server Import and Export Wizard’
Select the Server name and database name from which we need to export tables.
Destination Server information
You can specify the server name (it could be same or it can be a different instance)
In Database select new
Once you click on New for database you would be prompted with a screen like below where you can specify the database name.
Now we have information to proceed
Click on Next and then select 1st option “Copy data from one or more tables or views”
Now select the tables that you want to export.
Summary screen
Now you can see the exported tables in new database.
You can take backup of that database and send it across if needed.
How to: Back Up a Database (SQL Server Management Studio)
https://msdn.microsoft.com/en-us/library/ms187510.aspx
Content developed by: Romit Gulati
Content reviewed by: Lakhminder Singh
Comments
- Anonymous
January 09, 2012
Excellent article.What a shame it is arriving only now because i had to explain how to use this wizard on the MSDN (us) forums and as i have only french operating system and SQL Server 2008 , it is not easy to translate french towards english which is far to be good Many thanks and i hope to retrieve on this blogs articles as good as this one