HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Tool for quickly backup and restore a table

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
quicklytableforandrestoretoolbackup

Problem

Is there a tool for quickly backup and restore a table's data, preferably to a csv file?

It would be best if I could do it using batch. Run a .cmd file and data is backed up into a file with datetime name. And anytime needed I can just run another .cmd file to restore a file into the table.

Solution

BCP is the tool you're looking for.
Here's some links that should put you in the right direction:

https://msdn.microsoft.com/en-us/library/ms162802.aspx

https://www.simple-talk.com/sql/database-administration/working-with-the-bcp-command-line-utility/

Context

StackExchange Database Administrators Q#93220, answer score: 4

Revisions (0)

No revisions yet.