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.

I have a .bak file from an SQL Server database on an old hosting account, is there any way to view this file with an application on Mac OS X? All I need to do is get the data out of it.

Thanks,

Kyle

EDIT: I see that you can't read the file on Mac OS, however is there a relatively easy way to split the .bak file into it's component .mdf and .ldf files? A Mac solution is preferable but anything that doesn't require SQL Server to be installed is good. Thanks.

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

Short answer: No.

You can see a question on Server Fault that is somewhat related: http://stackoverflow.com/questions/156279/how-to-import-a-sql-server-bak-file-into-mysql

The .bak file is actually two files in one - a .mdf (data) and an .ldf (logs)

If you are somehow able to load the .bak file back into SQL Server you could then export a format that could be read.

Alternatively you can always try opening it in your favourite text editor (eg. TextMate, TextWrangler, BBEdit, emacs, vim, etc.) and see what information you can pull from the file.

share|improve this answer
    
Alright, that's sort of what I thought, I have had some success with a text editor, thanks. –  Kyle Aug 5 '09 at 5:40
add comment

Easiest thing to do is fire up your copy of parallels/vmware fusion or bootcamp with your favourite version of Windows and install SQL Server Express and do a restore.

As long as your database isn't bigger then 4GB you should be ok. If not, get your hands on SQL Server 2008 Developer.

You may have some success with Redgate Data Compare which can read .bak files. You may be able to trick it into generating SQL statements without SQL Server from the .bak, but you'll still need Windows.

share|improve this answer
add comment

No you can't. There's no software for the Mac that can read the file. You'd have to restore the database to a SQL Server of the same version of higher to get anything useful out of it.

You could read it in a text editor, as the bulk of the data is in plain text, but you won't get much out of it.

share|improve this answer
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.