File extension .DB - What kind of database is it exactly?

后端 未结 5 1255
悲&欢浪女
悲&欢浪女 2021-02-15 18:47

I have a database file with .DB file extension. I have been googling and it looks like SQLite. I tried to connect to it using SQLite and SQLite3 drivers and I am getting an erro

相关标签:
5条回答
  • 2021-02-15 19:13

    Marco Pontello's TrID is a great way to determine the type of any file.

    TrID is simple to use. Just run TrID and point it to the file to be analyzed. The file will be read and compared with the definitions in the database. Results are presented in order of highest probability.

    Just download the executable and the latest definitions file into the same directory and then run TrID:

    trid.exe "path/to/file.xyz"
    

    It will output a list of possible file types for the file with a confidence rating. Here's a screenshot of using TrID to analyze a SQLite database file:

    trid results

    There's also a GUI version called TrIDNet:

    tridnet results

    0 讨论(0)
  • 2021-02-15 19:18

    Look at the first 30 bytes of the file (open it in Notepad or Notepad++ or another simple text viewer). There's usually some kind of tag or extension name in there.

    Both SQLite 2 and SQLite 3 have a very clear message: "SQLite format 3" for SQLite 3 (obviously) and "** This file contains an SQLite 2.1 database **" for SQLite 2.

    edit
    Not that encrypted SQLite databases don't have a header like that, since the entire file is encrypted. See siyw's comment below.

    0 讨论(0)
  • 2021-02-15 19:28

    If you're on a Unix-like platform (Mac OS X, Linux, etc), you could try running file myfile.db to see if that can figure out what type of file it is. The file utility will inspect the beginning of the file, looking for any clues like magic numbers, headers, and so on to determine the type of the file.

    0 讨论(0)
  • 2021-02-15 19:31

    On a Unix-like system (or Cygwin under Windows), the strings utility will search a file for strings, and print them to stdout. Might help you narrow the field.

    There are a lot of programs besides database programs that use a "db" extension, including

    • ArcView Object Database File (ESRI)
    • MultiEdit
    • Netscape
    • Palm

    and so on. Google "file extensions" for some sites that catalog file extensions and the programs that use them.

    0 讨论(0)
  • 2021-02-15 19:38

    There's no conclusive way to know, because SQLite encrypts the entire database file, including the header.

    Further, there's not a lot of difference to you, except for possible error text to a user if you're prompting them for a password.

    0 讨论(0)
提交回复
热议问题