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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How do I create a copy of a sql database?
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

81 Posts

Posted - 02/02/2010 :  02:15:03  Show Profile  Reply with Quote

I need to create a copy of my database (sql server 2005) that I can allow someone else to download off of my web server & install the copy on their local machine.

What do I need to do in order to do this?


Norsk Yak Master

3271 Posts

Posted - 02/02/2010 :  02:19:12  Show Profile  Reply with Quote
Take a full backup, zip it and link it from your website. If you don't want to share the data just create a script using the wizard in management studio: Right-click the database you want to publish -> Tasks -> Generate script

- Lumbago
If the facts don't fit the theory, change the facts. Albert Einstein
Go to Top of Page


United Kingdom
22859 Posts

Posted - 02/02/2010 :  02:38:52  Show Profile  Reply with Quote
You could also DETACH the database, Zip up the MDF and LDF files, and put that on your website. But my preference would be a Backup file too.

Make sure the "empty" database is not too big when you back it up - it will restore to the same initial size (100GB might be a surprise for the new owner!). (Same is true of DETACH method of course)
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000