Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMEX database Upgrade to version 18 Failed #6077

Closed
CelticDragon1975 opened this issue Jul 4, 2023 · 16 comments
Closed

MMEX database Upgrade to version 18 Failed #6077

CelticDragon1975 opened this issue Jul 4, 2023 · 16 comments
Labels
Milestone

Comments

@CelticDragon1975
Copy link

Arggghhhhh - Never had a problem until now : Need some help
Screenshot 2023-07-04 222950

@n-stein
Copy link
Contributor

n-stein commented Jul 5, 2023

Do you have an SQLite browser you can run a pragma integrity_check? This will give us more information about what precisely is "malformed" in your database.

@tactilis
Copy link

tactilis commented Jul 5, 2023

@n-stein

Do you have an SQLite browser you can run a pragma integrity_check? This will give us more information about what precisely is "malformed" in your database.

As an aside, is there a way that pragma integrity_check could be provided in an .mmdbg file for running via Tools | Database | Database Debug, with the ability to display the output for copy/paste by the user?

If so, it would be preferable to asking users to investigate via an SQLite browser.

@CelticDragon1975
Copy link
Author

CelticDragon1975 commented Jul 5, 2023

Do you have an SQLite browser you can run a pragma integrity_check? This will give us more information about what precisely is "malformed" in your database.

Hi, Thank you for the response.

I’ve attached the SQL screenshot of the output.

image

@n-stein
Copy link
Contributor

n-stein commented Jul 5, 2023

is there a way that pragma integrity_check could be provided in an .mmdbg file for running via Tools | Database | Database Debug, with the ability to display the output for copy/paste by the user?
If so, it would be preferable to asking users to investigate via an SQLite browser.

Had the same thought. I've entered #6079. We can add a message box with the result of the integrity check prior to prompting for the debug file.

@n-stein
Copy link
Contributor

n-stein commented Jul 5, 2023

@CelticDragon1975 can you drag the field wider so the output isn't truncated with the '...'

@CelticDragon1975
Copy link
Author

@CelticDragon1975 can you drag the field wider so the output isn't truncated with the '...'

Hi Updated screenshot

Page5: btreeInitPage() returns error code 11

image

@CelticDragon1975
Copy link
Author

Should also say that running 1.6.3 I have no issue.

@vomikan vomikan added the bug label Jul 5, 2023
@vomikan vomikan added this to the v1.6.5 milestone Jul 5, 2023
@n-stein
Copy link
Contributor

n-stein commented Jul 5, 2023

Page errors are tough. When was your last backup? You can run an integrity check on your backups to see if they have the same issue. If you have a backup with no integrity issues you can start from that point and re-enter any missing transactions.

Or, you can try to rebuild your Live Accounts.mmb database by doing the below. Note that there is no guarantee all data can be recovered, so at the end of this process you should check to make sure all of your transactions are there (check expected balances, record counts, etc):

  1. In DB Browser go to File -> Export -> Database to SQL file.
    image

    Select these options:
    image

    Name it something like mmex-repair.sql

  2. In DB Browser import the file you just exported via File -> Import -> Database from SQL file. Select your mmex-repair.sql file.

    image

    When asked to create a new DB select "Yes". Name your new database (select the file type 'All Files' and save with the .mmb extension), something like mmex-fixed.mmb

    image

  3. Click 'Write Changes' to save the data.

    image

  4. Go to the "Edit Pragmas" tab, change "User Version" to 17, then click the "Save" button in the bottom right corner.

    image

  5. Optionally compare mmex-fixed.mmb to Live Accounts.mmb in DB Browser, check record counts for each table (to verify all records were recovered successfully).

  6. Open your mmex-fixed.mmb in 1.6.4. It should update correctly.

  7. Compare your mmex-fixed.mmb in 1.6.4 to your Live Accounts.mmb in 1.6.3, check for completeness.

@CelticDragon1975
Copy link
Author

Screenshot 2023-07-06 210201

This did not work - Now have the following error !!

@CelticDragon1975
Copy link
Author

Tried restoring from back ups from 2022 and similar errors. Had no problems upgrading until this more recent release.

@n-stein
Copy link
Contributor

n-stein commented Jul 6, 2023

Sorry, I missed a step after step 3. In your repaired DB go to the "Edit Pragmas" tab, change "User Version" to 17, then click the "Save" button in the bottom right corner.

image

Now the upgrade should work.

I have edited the steps above to include this in case another user attempts the same fix.

@CelticDragon1975
Copy link
Author

CelticDragon1975 commented Jul 8, 2023

Thank you for that additional step. All working and data integrity looks good.

@n-stein
Copy link
Contributor

n-stein commented Jul 13, 2023

@CelticDragon1975 If the issue has been resolved to your satisfaction please close.

@CelticDragon1975
Copy link
Author

Sorry selected wrong emoji

@tactilis
Copy link

Sorry selected wrong emoji

For info... you can just click an incorrectly applied emoji to remove it

@CelticDragon1975
Copy link
Author

Perfect thanks. I used long press.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants