I'll show you how to do it and then briefly discuss the pros and cons of archiving SQL tables this way.
There's only one step to this method. To that follow these steps:
- Open the server in your object explorer.
- Right click on the database.
- Select Tasks then Generate Scripts.
- Select the database that contains the data to be exported. Click next.
- Under the Table/View Options section make sure Script Data is set to True. Click next.
- Mark the check box for Tables. Click next.
- Mark the check boxes next to the tables to script structure and data. Click next.
- Select Script to file and enter a folder location, files to generate should be set to file per object, save as can be either depending on the data (I leave mine at unicode text usually). Click finish.
- Check to make sure everything exported to the directory you listed.
Pros:
- Same amount of effort for one or multiple tables
- Quick
- Everything contained in one file for each table
- Relatively large files depending on how many columns/rows each table has
- No was to review the data in a meaningful way outside of rebuilding the table and inserting the table
No comments:
Post a Comment