• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3133
  • Last Modified:

converting data in .mdf and .ldf files to excel or tab delimited file formats

Hi, I am very new to MS SQL Server. I am given a set of .mdf and .ldf files and I eventually need to import the data in these files into a MYSQL database running on Linux.  For now I like to somehow extract the data and export them into a tab delimited or comma delimited file formats. I downloaded and installed MS SQL server 2005 express edition but I am not sure what needs to be done from this point. This will probably be the only time that I have to deal with MS SQL server so I am not too eager to spend a lot of time on MS SQL server.  Could someone show me how to import the .mdf file into my MS SQL server and export the data to tab delimited file? Is there a better way to achieve this?

3 Solutions
Anthony PerkinsCommented:
You first need to attach the database.  Do you have SQL Server Management Studio installed?
Guy Hengel [angelIII / a3]Billing EngineerCommented:
acperkins is fully correct about the "attach".
here is how to do:

you execute the procedure in a sql window being connected to the master database of your local installation.
Eugene ZCommented:
if you prefer to use GUI:
install SQL Server Management Studio Express

----Then read :
How to: Attach a Database (SQL Server Management Studio)  
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Eugene ZCommented:

How to: Start the SQL Server Import and Export Wizard
dmehranAuthor Commented:
thanks for the hints. I am not sure if I have SQL Server Management Studio installed, Ill give this a try and get back to you.
dmehranAuthor Commented:
OK, after 3 days of SBC-yahoo DSL outage in my area (which is not very uncommon where I live) I finally got a chance to download and install the SQL server management studio and attach the database in my .mdf file. Now, how do I export the data in my tables into tab or comma delimited text files. Is there such a tool for this in the management studio GUI? you need to excuse my basic questions. I am used to linux command line and phpMyAdmin as GUI interface for MYSQL database, so these MS SQL tools are a bit new to me.

dmehranAuthor Commented:
never mind my last comment/question. After installing the SQL Management Studio the rest was pretty easy. thanks for all the answers
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now