3

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.

Hikari
  • 1,603
  • 12
  • 28
  • 42

1 Answers1

4

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/

spaghettidba
  • 11,376
  • 31
  • 42