Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

how can I get a Dump of a database with many tables to a flat file that is human readable quickly? Like csv or SQL create/update phrases. Or any binary format that can be viewed from a text viewer is fine.

The data export from management studio only allows one table at a time (?) which is not enough, I need all, there are many. Or how to circumvent this?

Actually I need to find some data in the database and understand which table and which column it belongs. We need this in a live system that belongs to us but the 3rd party developers are not reachable now, but for us it is enterprise critical to get it quickly.

I can access the db also in ms access, but to write such code would take too much time now (unless it is already available in this form)

There is also aqua data studio 4.7.2 available here

Microsoft SQL Server Management Studio  					9.00.3042.00
Microsoft Analysis Services-Clienttools 					2005.090.3042.00
Microsoft Data Access Components (MDAC) 					2000.086.3959.00 (srv03_sp2_rtm.070216-1710)
Microsoft MSXML 					2.6 3.0 6.0 
Microsoft Internet Explorer 					7.0.5730.13
Microsoft .NET Framework    					2.0.50727.3603
Betriebssystem  					5.2.3790
share|improve this question
add comment

2 Answers 2

Write up your SELECT statement which joins all tables and deposits the results into a new table. After your are satisfied with the returned data you can export that single table to XLS or whatever format you may want.

This still will require you to do the joins... but in the end it should be exactly what you want. I don't know of a free product which would do this automatically for you.

share|improve this answer
    
this sounds intersting. how would i join 2 tables with different fileds without enumerating the fields? –  user12096 Nov 23 '09 at 20:57
    
Are these relational tables or are they completely unrelated? If they're relational tables you shouldn't have a problem with enumerating the fields. If they're not related then I would think you'd be forced into dumping each table to xls. I'm not familiar with aqua data studio but did some searching around anyways. A more recent version supports the export of data to a variety of formats (including csv): aquafold.com/docs-exporttool.html Please let me know how that works out. Good luck. –  JohnyD Nov 24 '09 at 12:38
add comment

This is how I did it:

Download xampp from http://apachefriends.org, unzip, configure and start it, now there is a mysql server running on localhost

Migrate the SQL-Server database to the xampp mysql instance, using the mysql migration toolkit:

http://dev.mysql.com/doc/migration-toolkit/en/index.html

Go to http://localhost, there is an xampp phpmyadmin instance running, export the just created database as a single csv file. It can be necessary to increase php script maximum runtime or split the database in various parts (choosing only part of all the tables for each export)

share|improve this answer
    
of course it is possible to use an existing mysql server for this, but if there isnone available downloading xampp is probably the fastest solution –  user12096 Nov 25 '09 at 14:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.