Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Identifying unknown .db file and extracting data?

by dwm042 (Priest)
on Jan 06, 2011 at 18:18 UTC ( #880897=perlquestion: print w/replies, xml ) Need Help??
dwm042 has asked for the wisdom of the Perl Monks concerning the following question:

I have an unknown .db file and I've been asked to extract data from it. It's probably a Berkeley db file but I can't be certain of that. Any way to see if it is a Berkeley file, and if so, extract the data from it? A Perl based solution has some preference, though I'd hardly turn down a solution in a compiled language.

  • Comment on Identifying unknown .db file and extracting data?

Replies are listed 'Best First'.
Re: Identifying unknown .db file and extracting data?
by Anonyrnous Monk (Hermit) on Jan 06, 2011 at 18:37 UTC

    Treat it as if it were a Berkeley db file (see BerkeleyDB), and if it works, fine, otherwise try the next likely db format...

    Also, the file utility often helps:

    $ file mydata.dbm mydata.dbm: Berkeley DB (Hash, version 9, native byte-order)
Re: Identifying unknown .db file and extracting data?
by sundialsvc4 (Abbot) on Jan 07, 2011 at 01:56 UTC

    Speaking as someone who sells a software product that is designed to repair “.DB files,” I think there must be hundreds of different file formats out there (on Windows) that use that file extension.   Grrrr....   (Sigh....)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://880897]
Front-paged by Arunbear
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2018-03-24 23:53 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (299 votes). Check out past polls.