In the event that you need or want to revert to an earlier back-up of a database for whatever reason, the journal file associated with the database that is being replaced will obviously have more transactions in it compared to the back-up database. In other words, all transactions in the journal file that were completed after the back-up database was created will not have been run in the back-up database. Therefore, when you put the back-up database in production, you will first need to remove the extra transaction entries from the journal file. This article describes how to sync the journal file with the database.
- Server and database compatible version of swDatabaseManager.exe tool
- If running against an sqlite database, the SystemWeaver server must be stopped, i.e., you must have sole access to the database
- The database you are syncing the journal file with has journaling activated, and the .swjournal file matches, i.e., is associated with, the database
Note: The swDatabaseManager application is not for general distribution and should only be used by an authorized system administrator.
- As noted in the prerequisites, the SystemWeaver server application should be stopped if running a sqlite database.
- Open the swDatabaseManager.
- Select the database Type and Select database (e.g., you will be selecting the back-up database).
- On the Database tab, click the Display Info button to confirm that tool version is compatible with the database version.
- On the Mirroring tab, click Check against db to confirm that the journal file belongs to the selected database, i.e., their GUIDs match. The log will display that the journal is ahead of the database and will provide the last transaction id in the journal.
ExampleIn this example, the last id in the journal is 17.
- Next, click Remove extra entries to delete the extra entries from the journal file. This will put the database and journal file in sync with each other.
ExampleThe last transaction id in the database is 7. So, the journal file is 10 transactions ahead of the database (17-7=10). Therefore, the last 10 journal entries are removed.
You are now ready to restart the SystemWeaver main server against the database and then restart the mirror server.