Command line export and import CSV in SQL Server 2008 R2 I have a database xyz and 100+ tables and has to perform the following operations on the command line:


I need to create CSV of all tables in one go.
CSV with column separator ,, fields enclosed by " " and lines terminated by \n.  
Restore the all created CSV in one go.
Based on your need, I can suggest couple of options :


Use SSIS Import/Export; or  
Use BCP OUT and BCP IN


Each method has its own benefits and it all depends on your requirement which one to choose.