开发者

Mass export and import of sql table rows

开发者 https://www.devze.com 2023-01-13 09:55 出处:网络
I need to export the data from 36 SQL tables containing 24GB of dat开发者_开发知识库a into flat files, copy them to the client and import them there into the existing tables in his SQL database.

I need to export the data from 36 SQL tables containing 24GB of dat开发者_开发知识库a into flat files, copy them to the client and import them there into the existing tables in his SQL database.

And I will need this for several customers (same tables, though).

How do I mass export and import data?

Is there a command line tool for this so I can write a script for repeated use?


The basic knowledge you will find here Importing and Exporting Bulk Data

What is bcp ?


bcp.exe is the standard bulk import/export tool for MSSQL. Using SSIS packages is an alternative, but brings a lot of overhead with it: it's a full ETL tool. In TSQL there's also a BULK INSERT statement that you can use as an alternative to "bcp in", but I personally haven't played around to see which one is faster or more useful etc.

See "bulk exporting" and "bulk importing" in Books Online for all the details.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号