Solved

Archive SQL table to file

Posted on 2010-09-23
3
281 Views
Last Modified: 2012-05-10
Hi,
I need to archive a table from my sql database to file. Some records within the table contain XML data so i don't think exporting to csv/xls is an option. This data need to be archived programmatically on a regular basis. Also I need to know how to access this data in future if required(Import back in to temp table etc).
Thanks in advance for your help.
0
Comment
Question by:ncollings
3 Comments
 
LVL 9

Accepted Solution

by:
radcaesar earned 500 total points
ID: 33742642
Use the bcp tool to export the data to flat files and use the pipe "|" delimiter.

If you want to schedule that for future use, Have the bcp command in a batch file (.bat) and schedule it.
0
 
LVL 15

Expert Comment

by:AmmarR
ID: 33743173
Dear ncollings

when you say archive file, do you mean you want to access this file or just store it.

because if you just need to archive to backup and storage, you can use sql db back up
by right clicking on a database --> task --> backup

but if you want to access it programmatically.
you can detach the database file as is dbname.mdf and connect to it using vb.net

hope it clarifies


0
 
LVL 3

Author Closing Comment

by:ncollings
ID: 33767756
Pointed me in the right direction
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to use TOP 1 in a T-SQL sub-query? 14 46
display data in text field from data base for updating 6 65
Addition to SQL for dynamic fields 6 47
Sql Server group by 10 43
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question