Announcement

Collapse
No announcement yet.

read and convert an MSSQL DB dump using a portable language

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • read and convert an MSSQL DB dump using a portable language

    Hi, I have a mssql 2005 database dump file exported using the mgmt studio, which I want to be able to read using perl/python/php or whatever language common to opensource.

    Is there a way to do that?
    Real stupidity always beats Artificial Intelligence (c) Terry Pratchett

    BA (BM), RHCE, MCSE, DCSE, Linux+, Network+

  • #2
    Re: read and convert an MSSQL DB dump using a portable language

    Originally posted by DYasny View Post
    I have a mssql 2005 database dump file exported using the mgmt studio, which I want to be able to read using perl/python/php
    As far as I know, a flat Sql Server file is not usable as data source, unlike, say, Excel or Access db files are. So you need to either install Sql Server or SS Express Edition to a computer, restore the db to that and use ADO/OleDB/ODBC/whatever connection to the database.

    Further advice requires more info about what you are up to. Like, what do you want to convert the dump into?

    -vP

    Comment


    • #3
      Re: read and convert an MSSQL DB dump using a portable language

      Originally posted by vonPryz View Post
      As far as I know, a flat Sql Server file is not usable as data source, unlike, say, Excel or Access db files are. So you need to either install Sql Server or SS Express Edition to a computer, restore the db to that and use ADO/OleDB/ODBC/whatever connection to the database.

      Further advice requires more info about what you are up to. Like, what do you want to convert the dump into?

      -vP
      into something parsable by common tools, like perl or python
      Real stupidity always beats Artificial Intelligence (c) Terry Pratchett

      BA (BM), RHCE, MCSE, DCSE, Linux+, Network+

      Comment


      • #4
        Re: read and convert an MSSQL DB dump using a portable language

        You can export to CSV by e.g. connecting Access to the dB (and you should be able to do it from the SQL command line). Obviously you will need to know the structure of the database (tables and relationships
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment


        • #5
          Re: read and convert an MSSQL DB dump using a portable language

          Originally posted by Ossian View Post
          You can export to CSV by e.g. connecting Access to the dB (and you should be able to do it from the SQL command line). Obviously you will need to know the structure of the database (tables and relationships
          problem is I have to work with the existing file
          Real stupidity always beats Artificial Intelligence (c) Terry Pratchett

          BA (BM), RHCE, MCSE, DCSE, Linux+, Network+

          Comment


          • #6
            Re: read and convert an MSSQL DB dump using a portable language

            Originally posted by DYasny View Post
            problem is I have to work with the existing file
            Then install either Sql Server or SS Express, restore the dump and work from there. Python provides pyodbc, which is able to work with SS(EE). After you are done, the db can be ditched.

            -vP

            Comment


            • #7
              Re: read and convert an MSSQL DB dump using a portable language

              so essentially, there's nothing I can do with the file, until I actually take it into a windows machine with SQL and (possibly also) mgmt studio running, right?
              Real stupidity always beats Artificial Intelligence (c) Terry Pratchett

              BA (BM), RHCE, MCSE, DCSE, Linux+, Network+

              Comment


              • #8
                Re: read and convert an MSSQL DB dump using a portable language

                I'm afraid that's the case.

                -vP

                Comment


                • #9
                  Re: read and convert an MSSQL DB dump using a portable language

                  This is not usable for you?
                  http://www.easysoft.com/developer/la..._tutorial.html
                  Marcel
                  Technical Consultant
                  Netherlands
                  http://www.phetios.com
                  http://blog.nessus.nl

                  MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
                  "No matter how secure, there is always the human factor."

                  "Enjoy life today, tomorrow may never come."
                  "If you're going through hell, keep going. ~Winston Churchill"

                  Comment


                  • #10
                    Re: read and convert an MSSQL DB dump using a portable language

                    Originally posted by Dumber View Post
                    that's proprietary, isn't it?
                    Real stupidity always beats Artificial Intelligence (c) Terry Pratchett

                    BA (BM), RHCE, MCSE, DCSE, Linux+, Network+

                    Comment

                    Working...
                    X