0

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.

steve
  • 29
  • 1
  • 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 08 '14 at 00:02

2 Answers2

1

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)
Kin Shah
  • 60,908
  • 5
  • 111
  • 230
0

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

bjnr
  • 373
  • 1
  • 2
  • 10
  • 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 Shah Sep 07 '14 at 19:00