Exporting a database to a flat file

  • Is it possible in SQL Server to export and entire database to a flat file?

  • Frank,

    I know it is possible however, it isn't as easy as EXPORT Database to database.txt.

    You will have to EXPORT each table and/or view to it's own flat file.  AFAIK this is the only way you can do this because all of the tables, etc... will have differing structures

    Good Luck,

    AJ



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • Agree with AJ. That's the only way I know of. I'd build an isql script, doing a select * from each table piping to a file. The first would have a

        isql .... > myfile.txt

    and the remaining would be

       isql ... >> myfile.txt

     

  • You can use the SQL Server DB Export/Import feature and select all the database tables to a text file..

  • From the responses it sounds like a scripts generated from the database definitions is the way to go. It doesn't sound like there is a 'one-step' process, similar to the Oracle database export and import. BTW how do you do a carriage return in this forum? If I hit the ENTER key it posts the reply instead of giving me a new line.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply