Export multiple tables to a single flat file

Posted on 2007-08-09
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
    LVL 8

    Accepted Solution

    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

    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

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
    Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now