Solved

Archive SQL table to file

Posted on 2010-09-23
3
278 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now