Converting .BAK file of SQL Server DB to .CSV

11,506

I recently needed to convert a MS SQL Server database backup in .BAK format to anything digestible by other tools such as CSV, SQL. The only thing I found was online converter RebaseData. It's free for smaller file sizes, up to 10MByte.

Share:
11,506
Webbly Brown
Author by

Webbly Brown

Updated on June 04, 2022

Comments

  • Webbly Brown
    Webbly Brown almost 2 years

    Ok so I have a .bak file which is a backup of our old CRM data. This has come from a backup of an SQL SErver database (not sure what version). What I am trying to achieve is converting all the data that file contains in a .CSV that I can then use to import the data into a different CRM.

    I have tried the obvious things, renaming the file .csv and trying various text editors and applications that claim to be able to view these kind of files. All I ever get is a ton of gibberish, by that I mean a ton of characters and symbols that clearly do not represent what is in the data backup.

    From what I have obtained already, I need to restore this file to an SQL Server database, and then do the export to .csv. I have managed to set up a trial version of SQL server 2012, however when I try to import the file (import from flat file option), when I get to the preview, it appears to just be gibberish populating the fields again, and if I then run that anyway, its fails and returns errors. I can confirm that another CRM company had managed to restore this and extract what they needed, sadly we decided not to continue with them, but based on that, I would say the .bak file is not corrupted.

    I assume I am doing something wrong. My question is what is the correct way to import / restore a .bak file into MS SQL 2012?

    Is there an alternative that I have missed or is this not the right approach to begin with?

    Any help greatly appreciated as always!