Sql-server – SQL Server – creating a historical data backup

backupsql server

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.

Best Answer

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)