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

后端 未结 5 1270
悲&欢浪女
悲&欢浪女 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: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.

提交回复
热议问题