Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've run out of space on my SQL Server 2008 Express DB.

i'm creating a "duplicate" SQL Server 2008 Express DB so i can backup my data before i purge my DB so i can start over. Is there a way in SQL Server to view the DDL text file, so i can easily recreate the empty table before i push data into it?

Also, is there as "easy" way to bulk push data from one table into another once i've created the backup structure?

at first i tried deleting some old rows, but of course that just increases the log file.

share|improve this question
I advise referring to this as an archive rather than a backup. Different communities (such as Finance and IT in particular) have historically used the term backup with wildly divergent meanings. Calling something an archive avoids the nasty surprise of waking up one morning to discover that your backup was deleted by IT because it was only a backup, so you must have several more lying around. – Pieter Geerkens Sep 8 '14 at 0:02

I've run out of space on my SQL Server 2008 Express DB.

Best is to script out the schema using SSMS. Then

  • Take a full backup of your database --or--
  • bcp out the data from the tables. (note: the script will bcp out in native format. Change it to bcp out data in human readable format - by removing -n)
share|improve this answer

By using SQL Server Import and Export Wizard or by using T-SQL script.

share|improve this answer
It would be great if you could add some summary to your answer. Link only answers are not useful in many ways and those links might become broken in future. – Kin Sep 7 '14 at 19:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.