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,403
  • 10
  • 25
  • 36
  • 1
    You can use [Option 2 - my bcp script](http://dba.stackexchange.com/a/55063/8783). Just change it as per your needs. – Kin Shah Feb 18 '15 at 14:34
  • I saw a nice presentation done by Kroll ontrack on the german SQL Konferenz 2 weeks ago. Just as info that there is at least one tool to restore only one table. Constraints however need to be re-created and tool is not free. But still great. Have a look at: http://www.krollontrack.com/company/news-releases/?getPressRelease=63571 – RayofCommand Feb 18 '15 at 14:54

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
  • 10,872
  • 25
  • 40