Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Copying data from server to local db

Author  Topic 

anonymowho
Starting Member

3 Posts

Posted - 2011-03-04 : 15:02:21
Hi,

There are about 15 tables on our SQL server with data in them. I wanted to get a copy of the schema and the data for these 15 tables to my local database on my machine so I can play around offline.

I have created the schema on my machine for these 15 tables but I am not sure how to get the data from these 15 tables into my local DB

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-04 : 15:04:06
You can use the import/export wizard in SSMS, however this problem is best completed via backup/restore. Can you get a copy of the production backup for this database and restore to your local machine?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

anonymowho
Starting Member

3 Posts

Posted - 2011-03-04 : 15:18:45
Thanks, using the import export utility I was able to copy over all the data. But I was wondering, is there an easy way to copy the schema for these 15 tables over to my local machine? Import Export utility only copied the data not the schema.

In my original post, when I said I was successfully able to copy the schema to my local machine, I did it one by one for all the 15 tables. Not sure if there is an easier way to copy schema.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-04 : 15:35:02
Backup/restore is the best option. It ensures you have an exact duplicate of the source database.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -