I'll show you how to do it and then briefly discuss the pros and cons of archiving SQL tables this way.
Step 1 is to export all the data. To that follow these steps:
- Open the server in your object explorer.
- Right click on the database.
- Select Tasks then Export Data.
- Export the data from the table you choose in the format you choose.
Step 2 is to script the table so you can re-create it.
- Right click on the table in your object explorer.
- Click Script Table as | CREATE To | New Query Editor Window
- Save the file.
After that I would usually do a couple of things to make sure everything is working correctly. I would run the table creation script and import the data file into it. If that worked correctly then I would compare the data in the new table to the old table and check to make sure everything looks correct. After that I would go ahead and drop both tables knowing that I have an operational backup should I need it.
Pros:
- Fairly easy to do for one table
- Data can be read outside of SQL
- Table script can be reviewed and is relatively small file
- Gets tedious when backing up multiple files (or re-create multiple tables)
- Lots of files to keep track of
No comments:
Post a Comment