We help IT Professionals succeed at work.

SQL Server - exporting db data in flat file

Hi Everyone, I have a SQL Server 2005 db, and a client is asking for the data in a flat-file format.

I gave them both a db backup and a scripted db file, but that's only the db structure.
I also tried the Data Export wizard, exporting to a txt file, but still, no db data.

Any idea how I can do this?


Watch Question

Is this a 1 time deal just use SQL Management studio.

Run the query.. In the results right click the header and select copy with headers

Paste in Excel and save as csv

If you have to do it often there are ways to run it automatically.. Or look into enabling reporting services that could even automate emails..


It's a 1 time deal only.  How do I run the query exactly? They need all the data in the db. Can I do this or do I need to do it table by table?

For example: server name is dbserver1, database name is photocollections1, and I want to save it to c:\dbdata.txt



Explore More ContentExplore courses, solutions, and other research materials related to this topic.