".sql" files for datafiles??

  • Hello...

    A DBA colleague of mine has taken possesion over a small application that is apparently developed in Visual FoxPro, and with it came a BIG bunch of ".sql" files (250 files) that are about 4 gb each. There is no way to contact the people who developed or mantained that application, so we hit google trying to find a way on how we could access the information within them, but with no luck.

    Has any of you guys in your vast experience ever dealed with files with these characteristics?.

    Your help is really appreciated... Thanks in advance!

  • .SQL files are generally plain-text files that contain SQL scripts. They are intended to be run against a database. When they are that large, it most likely means that the files were generated via an export from the database. They would represent either a backup or a schema definition. Although they may contain data intended for a database, they are not database data files. They are SQL scripts. They are only useful when they are run against a database.

    If you can get them open, check to make sure they are text files. If not, you've got something really weird. If they are text, try and open them in SQL Server Management Studio. Hopefully it will open something that large. Create a temporary database and run the scripts against it. Hopefully, it will generate a bunch of tables, loaded with data.

    --J

  • Hello and thank you for replying, jvanderberg!

    We tried to open one of the files with MS SQL Server Management Studio, but it failed to do it. We also tried to open it with Visual FoxPro, but it does not recognize the file as a table/DBF. Like you said... looks like we have something weird here. :unsure:

  • As long as we're all just guessing...

    Maybe the old developer zipped up his SQL to deliver to you. You might try to unzip the file and see what happens.

    If you open it in a hex editor, can you see anything that might provide a clue?


    And then again, I might be wrong ...
    David Webb

  • A 4GB file is really excessive, my immediate thoughts would be that they may be backup files.

    There are some really good text editors out there and as one person said SQL files are just specially formatted text files so you should be able to open it with a good text editor such as notepad++ or Ultra Edit. If the file looks like code, then great try and split it into smalled chunks so you can open it in SSMS.

    However, if the file looks encrypted then it is not a true sql file, so take a copy of one of the files, change the extension to .bat and try to restore from it, or alternatively change the extension to mdf and try to attach it.

    Hope this helps,
    Rich

    [p]
    [/p]

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply