Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Export Microsoft SQL database - have raw db

Options
  • 10-01-2014 11:44am
    #1
    Registered Users Posts: 6,501 ✭✭✭


    I am trying to export the contents of a Microsoft SQL Server database in order to eventually import it into WordPress.

    The database is used by a DotNetNuke based site. Due to a complicated relationship between the site owners and the person hosting the site (not a company) I have not been able to get access to the admin area of the site or access to the database.

    I was given a big binary file which might be a raw copy of the database. The first 4 chars of the file's header are "TAPE" with "Microsoft SQL Server" and "RAID" shortly after that. Of course this may be some raw copy of a backup.

    Does this sound like a raw MS SQL Server database?
    If so, would someone be able to load it and export it? (I don't have access to MS SQL Server)


Comments

  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    It sounds like a SQL Server backup file. Typically people give these a file extension of .bak or something similar, but there's no requirement to do so.

    To extract the data from this, you will need to use SQL Server. Basically all you need to do is use SQL Server to create a new database, then restore your file to it. You can then use SQL Servers tools to export the data in some friendlier format.

    If you don't have SQL Server yourself already, SQL Server Express (along with the SQL Server Express Management Tools) should do fine, as long as the file is under the size limit (4GB for older versions, I think it's 10GB for the newer ones).




    edit: FWIW raw SQL Server databases would typically be two files, a .MDF which is the data itself and a .LDF which would be the transaction log.


  • Registered Users Posts: 2,149 ✭✭✭dazberry


    daymobrew wrote: »
    I was given a big binary file which might be a raw copy of the database. The first 4 chars of the file's header are "TAPE" with "Microsoft SQL Server" and "RAID" shortly after that. Of course this may be some raw copy of a backup.

    Does this sound like a raw MS SQL Server database?
    If so, would someone be able to load it and export it? (I don't have access to MS SQL Server)

    Looking at "one I made earlier", it is indeed an MS SQL Server backup file. You will need MS SQL Server Management Studio to restore the file. Here are some instructions on how to restore a backup.

    HTH

    D.


  • Registered Users Posts: 6,501 ✭✭✭daymobrew


    dazberry wrote: »
    Looking at "one I made earlier", it is indeed an MS SQL Server backup file. You will need MS SQL Server Management Studio to restore the file.
    I looked at the downloads involved and it seemed to involve several GB.
    The backup file is 140MB.

    If I made the file available would you or stevenmu be able to do the restore and export for me?


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    Yeah, I could do it either this evening or over the weekend at some point if you want to send me a link to the file.

    I wouldn't have MySQL, but could export it out to CSV files or Excel or something like that?


  • Registered Users Posts: 6,501 ✭✭✭daymobrew


    stevenmu wrote: »
    Yeah, I could do it either this evening or over the weekend at some point if you want to send me a link to the file.

    I wouldn't have MySQL, but could export it out to CSV files or Excel or something like that?
    Great. I have uploaded it to S3 (url in PM).
    Both CSV and Excel would be great (both in case some fields have the chosen CSV delimiters).


  • Advertisement
  • Registered Users Posts: 6,501 ✭✭✭daymobrew


    Steve has done an export for me - major thanks.

    I will not sift through the data, spread across multiple tables. :eek:


Advertisement