Giter VIP home page Giter VIP logo

Comments (9)

MKleusberg avatar MKleusberg commented on May 16, 2024

I think this is a SQLite thing. We have no code regarding these files, it all happens in SQLite. On https://www.sqlite.org/wal.html it says that "the wal-index backing file is deleted when the last database connection disconnects" which is exactly what happens on my system: If I have multiple instances of our application with the same file opened, I can close any of them and the files stay where they are. If I close the last one though, they are deleted.

from sqlitebrowser.

brianeunilkim avatar brianeunilkim commented on May 16, 2024

Oh I see. I do notice that when I open the sqlite file again those shm and wal files reappear. Thanks for your answer!

from sqlitebrowser.

MKleusberg avatar MKleusberg commented on May 16, 2024

Thanks for the feedback. Glad I could help 😃

from sqlitebrowser.

sammarcus avatar sammarcus commented on May 16, 2024

Stupid question, but is there a way to open WAL files directly? I have a .db-wal file I was looking to browse apart from my .db.

Thanks!

from sqlitebrowser.

rp- avatar rp- commented on May 16, 2024

.db-wal is a temporary file created by the sqlite3 code/library, you cannot directly open such file.
There should be a corresponding sqlite3 db file.

from sqlitebrowser.

sammarcus avatar sammarcus commented on May 16, 2024

Thanks so much for the help, Peinthor! Indeed there is, would this main db reflect the data in the Write-Ahead log before the commit to purge it? If not, is there any way at all to see what this data is before it has been added to the main db?

from sqlitebrowser.

rp- avatar rp- commented on May 16, 2024

well, kinda. I don't know the implementation details, but I think this WAL file has checkpoints and uncommitted data.
But for details you should read the sqlite3 documentation:
https://www.sqlite.org/wal.html

from sqlitebrowser.

Z4us avatar Z4us commented on May 16, 2024

@sammarcus wrote 'stupid question'. With the sole exception of the unasked there is no such thing as a 'stupid question'. Stupid answers however there are unfortunately too many...

Back on-topic: like someone said: by opening more than one session (e.g. more TerminalTabs) one can easily have more WA-L and/or SHM-files and investigate them with any tool/language (Perl is an easy example) capable of handling binary files. With the help of SQLite's doc you're able to analyze them and search for nugs and other reasons of corrupted databases.

"In bocca al lupo",
Klaas

from sqlitebrowser.

sammarcus avatar sammarcus commented on May 16, 2024

@rp- thanks so much for that documentation! I had seen it before but gave it another reread, made some new discoveries. appreciate the link!

@Z4us thank you as well!! I'm just starting out so I always like to preface my beginner questions with that disclaimer but the git community has been so friendly. I got it all figured out.. thanks again!

from sqlitebrowser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.