Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

ID DAT db files

by gryphon (Abbot)
on Jul 08, 2002 at 04:25 UTC ( [id://180086]=perlquestion: print w/replies, xml ) Need Help??

gryphon has asked for the wisdom of the Perl Monks concerning the following question:

Greetings fellow monks,

I have an interesting and strange problem: I have a series of database files (15 to be exact) that I'd like to read data from. However, I don't have a clue what RDBMS (or even just DBMS) the files belong to. They all have *.DAT extention, but the various sites I've searched in hopes to find out what these are simply say they're "database files". (Yeah, I knew that already.) Once I figure out where the files come from, I could probably hack something together with DBI and some old DBD from CPAN. In the meantime, I'm stuck.

Is there anything out there that can do a "detect" and convert on these files? Or perhaps at least point me in the right direction?

The files don't seem to have any naming on them with the following possible exception: All of the files have positions 02 through 04 at the start of the file read FF, FF, 58. And it looks like character 03 is used as a column seperator. And 2E ends a record.

Any thoughts or ideas? If I can't find anything really promising soon, I'm probably going to just write something to manually parse this stuff out of the original binary, but that idea frightens me.

-gryphon
code('Perl') || die;

Replies are listed 'Best First'.
Re: ID DAT db files
by blakem (Monsignor) on Jul 08, 2002 at 06:02 UTC
    If you're on a Unix system, try the 'file' command...
    % file unknownbinary.dat unknownbinary.dat: Berkeley DB 2.X Hash/Little Endian (Version 5, Logical sequence number: file - 0, offset - 0, Bucket Size 4096, Overflow Point 10, Last Freed 647, Max Bucket 974, High Mask 0x3ff, Low Mask 0x1ff, Fill Factor 0, Number of Keys 16238) % file anotherbinary.dat anotherbinary.dat: GIF image data, version 89a, 19 x 45,

    -Blake

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://180086]
Approved by epoptai
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-24 01:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found