Database corruption since LO 5.7.3 installed

classic Classic list List threaded Threaded
14 messages Options
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Database corruption since LO 5.7.3 installed

Since upgrading to LO 5.7.3 a database of mine keeps getting corrupted. When
I try to open it it opens in Writer with the text Ó×r6ÒÒ#v   If I try
opening it in a Zip file reader I'm told it's not a valid Zip file. It's not
consistent though; sometimes it opens OK.

It's an embedded HSQLD database and I'm running Windows 7.

Has anyone else here seen this? It doesn't seem to be in Bugzillla.



-----
Peter
--
Sent from: http://nabble.documentfoundation.org/Users-f1639498.html

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Peter
Robert Großkopf Robert Großkopf
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

Hi Peter,

Am 07.01.2018 um 13:23 schrieb ptoye:
> Since upgrading to LO 5.7.3 a database of mine keeps getting corrupted. When
> I try to open it it opens in Writer with the text Ó×r6ÒÒ#v   If I try
> opening it in a Zip file reader I'm told it's not a valid Zip file. It's not
> consistent though; sometimes it opens OK.
>
> It's an embedded HSQLD database and I'm running Windows 7.
>
> Has anyone else here seen this? It doesn't seem to be in Bugzillla.

There isn't a special database-problem with LO 5.3.7. Do you use LO and
Java in the same bit-version?

Seems to be you file is really corrupted. If you couldn't get the
content with unzipping the *.odb-file I don't know any way to get the
data back.
You could only use a copy from your last backup instead.

Regards

Robert
--
Homepage: http://robert.familiegrosskopf.de
LibreOffice Community: http://robert.familiegrosskopf.de/map_3


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
jorge Rodríguez jorge Rodríguez
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

In reply to this post by ptoye
Hi Ptoye and all:

         You say that sometimes the data file open well. When it happen,
I suggest you to save the file with a new name (Other file). I would
solve your problems.

Regards,

Jorge Rodríguez


El 07/01/2018 a las 06:23, ptoye escribió:

> Since upgrading to LO 5.7.3 a database of mine keeps getting corrupted. When
> I try to open it it opens in Writer with the text Ó×r6ÒÒ#v   If I try
> opening it in a Zip file reader I'm told it's not a valid Zip file. It's not
> consistent though; sometimes it opens OK.
>
> It's an embedded HSQLD database and I'm running Windows 7.
>
> Has anyone else here seen this? It doesn't seem to be in Bugzillla.
>
>
>
> -----
> Peter
> --
> Sent from: http://nabble.documentfoundation.org/Users-f1639498.html
>


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

In reply to this post by Robert Großkopf
Thanks Robert. Restoring from a backup is exactly what I've been doing. But
it's odd. It's a database I use about once or twice a week (depending on how
much wine I've been drinking), and it's failed to open 4 times since then:
the saved dates were 26 November, 24 December, 27 December and 5 Jan. I've
used it more often, though, and I've decided to save a copy whenever I save
the original. And possibly I'll save the original before opening it as well.

I agree that the database is corrupt, but what's corrupting it? I haven't
had any such corruptions on any other LO documents (famous last words?) or
other files. I've had a closer look, and the corrupt files seem to be the
last 46 KB (approx) of the original (which are 184 KB).

Both LO and Java are 64-bit versions.  Is it a good idea to revert to 32-bit
versions? I'm not sure how LO decides which Java to use if given the choice;
I assume it picks up the same bit-version. Bugzilla doesn't show any obvious
connection between 64-bit and database corruption.



-----
Peter
--
Sent from: http://nabble.documentfoundation.org/Users-f1639498.html

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Peter
Robert Großkopf Robert Großkopf
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

Hi Peter,
>
> Both LO and Java are 64-bit versions.  Is it a good idea to revert to 32-bit
> versions? I'm not sure how LO decides which Java to use if given the choice;
> I assume it picks up the same bit-version. Bugzilla doesn't show any obvious
> connection between 64-bit and database corruption.

It's right. It has only to be the same bit-version.

You could use the macro for copying the file to the backup-folder of LO
when opening the file. It's published in the Base-Handbook. I could post
it here also.

With this macro you get, for example, 10 different versions saved in the
backup-folder. If you get any problems whith opening a file you could
choose the last backup there.

Regards

Robert
--
Homepage: http://robert.familiegrosskopf.de
LibreOffice Community: http://robert.familiegrosskopf.de/map_3


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
remygauthier remygauthier
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

Hi,
This problem seems to have been observed not so long ago:
https://ask.libreoffice.org/en/question/63369/repair-corrupt-odb-file/
The fix that is mentioned in that post is there:
https://forum.openoffice.org/en/forum/viewtopic.php?f=83&t=17567
Not sure if the proposed solution will help, but it seems that this
type of corruption is not uncommon.
Rémy Gauthier.
Le dimanche 07 janvier 2018 à 18:49 +0100, Robert Großkopf a écrit :

> Hi Peter,
> > Both LO and Java are 64-bit versions.  Is it a good idea to revert
> > to 32-bit
> > versions? I'm not sure how LO decides which Java to use if given
> > the choice;
> > I assume it picks up the same bit-version. Bugzilla doesn't show
> > any obvious
> > connection between 64-bit and database corruption.
>
> It's right. It has only to be the same bit-version.
>
> You could use the macro for copying the file to the backup-folder of
> LO
> when opening the file. It's published in the Base-Handbook. I could
> post
> it here also.
>
> With this macro you get, for example, 10 different versions saved in
> the
> backup-folder. If you get any problems whith opening a file you could
> choose the last backup there.
>
> Regards
>
> Robert
> --
> Homepage: http://robert.familiegrosskopf.de
> LibreOffice Community: http://robert.familiegrosskopf.de/map_3
>
>
--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Robert Großkopf Robert Großkopf
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

Hi Remy,

seems you haven't read the first mail of this thread:
"If I try opening it in a Zip file reader I'm told it's not a valid Zip
file."

The way to repair a *.odb-file is described in the Base-Handbook in
detail. But if you can't extract anything there you couldn't get data
out of a corrupted file.

Regards

Robert
--
Homepage: http://robert.familiegrosskopf.de
LibreOffice Community: http://robert.familiegrosskopf.de/map_3


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

In reply to this post by Robert Großkopf
I think that the first thing to do is to work out if the corruption's
happening on loading or saving. It's easy to see what's happening as the
corrupted file is of a very different size, so I can see it in Explorer.
That at least will give me a handle on the problem. Then I can work out
whether to make a copy on loading - not much point if that's what does the
corruption.



-----
Peter
--
Sent from: http://nabble.documentfoundation.org/Users-f1639498.html

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Peter
zahra a zahra a
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

hi peter.
if you are sure that your file is corrupted, just right click on it
and find properties.
in the security tab, find and select previous versions.
then press okay button.
it restores previous version (that worked properly for you).
God bless you all.

On 1/8/18, ptoye <[hidden email]> wrote:

> I think that the first thing to do is to work out if the corruption's
> happening on loading or saving. It's easy to see what's happening as the
> corrupted file is of a very different size, so I can see it in Explorer.
> That at least will give me a handle on the problem. Then I can work out
> whether to make a copy on loading - not much point if that's what does the
> corruption.
>
>
>
> -----
> Peter
> --
> Sent from: http://nabble.documentfoundation.org/Users-f1639498.html
>
> --
> To unsubscribe e-mail to: [hidden email]
> Problems?
> https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
> List archive: https://listarchives.libreoffice.org/global/users/
> All messages sent to this list will be publicly archived and cannot be
> deleted
>
>


--
we have not sent you but as a mercy to the entire creation.
holy quran, chapter 21, verse 107.
in the very authentic narration from prophet Mohammad is:
indeed, imam husayn is the beacon of guidance and the ark of salvation.
best website for studying islamic book in different languages
www.al-islam.org

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

Thanks, but at the moment I'm making manual backups. Unfortunately (?) it
hasn't happened again. Very frustrating.



-----
Peter
--
Sent from: http://nabble.documentfoundation.org/Users-f1639498.html

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Peter
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

In reply to this post by Robert Großkopf
Robert Großkopf wrote
> You could use the macro for copying the file to the backup-folder of LO
> when opening the file. It's published in the Base-Handbook. I could post
> it here also.

That would be very useful Robert. I've found that the corruption is
happening when I close LO. So saving when I open, and also possibly before
closing might at least preserve the data.

I suspect that the best solution would be to install HSQLDB on my machine
and separate the database from the LO front-end. This sounds like a bit of a
pain, though.




-----
Peter
--
Sent from: http://nabble.documentfoundation.org/Users-f1639498.html

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Peter
Robert Großkopf Robert Großkopf
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

Hi Peter,

here the macro for saving data while opening or running Base:

----------------
SUB DatabaseBackup(inMax AS INTEGER)
        REM A copy of the databasefile *.odb would be created in the
Backup-folder.
        REM The amount is limited to 5 copies. After it has reached 5 copies,
the oldest copy would be replaced by the new copy.
        REM This procedure doesn't solve the problem, that input of data in the
opened HSQLDB-database couldn't be solved.
        REM Data of the internal HSQLDB were written in the *.odb-file, when
the file will be closed.
        REM The procedure "WriteDataFromCache" helps to write the data into the
opened *.odb-file.
        DIM oPath AS OBJECT
        DIM oDoc AS OBJECT
        DIM sTitel AS STRING
        DIM sUrl_Target AS STRING
        DIM sUrl_Start AS STRING
        DIM i AS INTEGER
        DIM k AS INTEGER
        oDoc = ThisComponent
        sTitel = oDoc.Title 'Name of the document, for example
Media_with_Macros.odb
        sUrl_Start = oDoc.URL 'Path to the title
        oPath = createUnoService("com.sun.star.util.PathSettings")
        FOR i = 1 TO inMax + 1
                IF NOT FileExists(oPath.Backup & "/" & i & "_" & sTitel) THEN
                REM Saved in the backup-path of the database-user of LO, beginning
with the number, followed by a underscore and the title of the database.
                        IF i > inMax THEN
                        REM If i bigger than 5, 5 backupcopies do exist. Now we have to look,
which copy is the oldest.
                                FOR k = inMax -1 TO 1 STEP -1
                                        IF FileDateTime(oPath.Backup & "/" & k & "_" & sTitel) <=
FileDateTime(oPath.Backup & "/" & k+1 & "_" & sTitel) THEN
                                        REM File with number 4 must be created before number 5. If this is
right, searchung is going on.
                                        REM Searching begins with 4, counting downward. The number is
matched with the number raised by one.
                                        REM If 1 is reached and created before 2, 1 would be replaced by
the new copy.
                                                IF k = 1 THEN
                                                        i = k
                                                        EXIT FOR
                                                END IF
                                        ELSE
                                        REM If a number of a file is found, where the file is created later
as the file with the number raised by one, the file with the number
raised by one would be replaced.
                                                i = k+1
                                                EXIT FOR
                                        END IF
                                NEXT
                        END IF
                        EXIT FOR
                END IF
        NEXT
        sUrl_Target = oPath.Backup & "/" & i &"_" & sTitel
        REM The path for the targetfile is created and the document will be
copied to this targetfile.
        FileCopy(sUrl_Start,sUrl_Target)
END SUB

SUB WriteDataFromCache
        REM Writes data of the opened HSQLDB-database while running Base
directly to the harddrive.
        DIM oData AS OBJECT
        DIM oDataSource AS OBJECT
        oData = ThisDatabaseDocument.CurrentController
        IF NOT ( oData.isConnected() ) THEN oData.connect()
        oDataSource = oData.DataSource
        oDataSource.flush
END SUB

SUB BackupNow
        WriteDataFromCache
        DatabaseBackup(10)
END SUB

SUB BackupAtStart
        DatabaseBackup(10)
END SUB

--------------------------------

You could also download it from here:
http://robert.familiegrosskopf.de/lo_hb_en/Media_with_Macros.odb

If you start the macro while opening the database (view created) you
have to use the sub BackupAtStart.
If you start the macro while using the database (have opened any table,
created new rows ...) you should start BackupNow. It will first save all
data in the *.odb-file and afterwords save the database to the
backup-folder of LO.

Regards

Robert
--
Homepage: http://robert.familiegrosskopf.de
LibreOffice Community: http://robert.familiegrosskopf.de/map_3


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

Thanks Robert, that's fantastic. I'll try it out later this week.



-----
Peter
--
Sent from: http://nabble.documentfoundation.org/Users-f1639498.html

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Peter
ptoye ptoye
Reply | Threaded
Open this post in threaded view
|

Re: Database corruption since LO 5.7.3 installed

In reply to this post by Robert Großkopf
Robert Großkopf wrote
> here the macro for saving data while opening or running Base:

Thanks Robert, that's fantastic. I'll try it out later this week.



-----
Peter
--
Sent from: http://nabble.documentfoundation.org/Users-f1639498.html

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Peter