Learn how to a build a cloud-first strategyRegister Now


Export multiple tables to a single flat file

Posted on 2007-08-09
Medium Priority
Last Modified: 2013-11-30
How to export multiple tables to a single flat file?
Is it possible to export n number of tables to n number of files at once?

Question by:poojanair

Accepted Solution

natoka earned 2000 total points
ID: 19668349
if n is variable - perhaps bcp would be the best choice then.

Anyway exporting all n tables at once is most likely never a good choice when it comes to performance.
So perhaps exporting the tables consecutively is better, in case of bcp you can do it with xp_cmdshell

But be aware that bcp can create quite a heavy strain in IO and CPU terms on your machine (depending on the size of the table getting exported)

Author Comment

ID: 19669960
Ofcourse BCP is second option.But I'm interested in knowing how to do the n table export using Import Export Wizard/using Packages in SQL 2005.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question