[Solved] Data loss in non embedded database
[Solved] Data loss in non embedded database
hi im having a problem in my database
my mydb.data having a size of 360,278 KB, mydb.backup= 123,763 KB, mydb.script= 13kb, mydb.properties= 1kb
when i open my database, all of my data disappear...
when i open my back up, the data and backup is almost the same, mydb.data= 356,326kb, mydb.backup= 334,958kb
then i overwrite my previous mydb.backup (334,958kb) to my present mydb.backup (123,763 KB) then my mydb.data become 356,326kb after i open my mydb.server
i don't know how this happen, somebody help me to this? and how can i retrieve my data with mydb.data (360,278 KB)
my mydb.data having a size of 360,278 KB, mydb.backup= 123,763 KB, mydb.script= 13kb, mydb.properties= 1kb
when i open my database, all of my data disappear...
when i open my back up, the data and backup is almost the same, mydb.data= 356,326kb, mydb.backup= 334,958kb
then i overwrite my previous mydb.backup (334,958kb) to my present mydb.backup (123,763 KB) then my mydb.data become 356,326kb after i open my mydb.server
i don't know how this happen, somebody help me to this? and how can i retrieve my data with mydb.data (360,278 KB)
Last edited by path32 on Sat Sep 22, 2012 3:32 am, edited 1 time in total.
Apache Open Office 3.4, 4.0, HSQLDB 1.8(non embedded database) Windows 7, UBUNTU 10.04
Re: Data loss in non embedded database
Did you recover most of your data from the backup, or are you still having problems with the data recovered from the backup?path32 wrote:hi im having a problem...
mydb.data 360,278 KB
mydb.data become 356,326 KB
...how can i retrieve my data?
Are you really working with a 360 MB (megabyte) database? Or do you mean 360 KB (360,278 Bytes)?
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
Re: Data loss in non embedded database
thanks DACM,
im working with 360MB,
when i back up, theres no problem when i retrieve the data.
my problem is, how mydb.backup become 123MB, when my mydb.data is 360MB.
and how i can recover mydb.backup using mydb.data?
im working with 360MB,
when i back up, theres no problem when i retrieve the data.
my problem is, how mydb.backup become 123MB, when my mydb.data is 360MB.
and how i can recover mydb.backup using mydb.data?
Apache Open Office 3.4, 4.0, HSQLDB 1.8(non embedded database) Windows 7, UBUNTU 10.04
Re: Data loss in non embedded database
Wow, that's a large database (if you're not storing image files in the database). I hope you've enlarged your HSQLDB cache memory and perhaps adjust Java 'heap' memory to accommodate the large cache:path32 wrote:my problem is, how mydb.backup become 123MB, when my mydb.data is 360MB.
- (1) Adjusting HSQLDB Cached Table Memory for Large Databases (>3 MB) (key if you're experiencing slow database response)
(2) Adjust Java 'heap' Memory when running in: File-mode / Server-mode (avoids "Out of Memory" error with large databases, queries and/or reports)
Recall that .backup is a zip archive of .data. So, if you mean recover .data from .backup,path32 wrote:...and how i can recover mydb.backup using mydb.data?
Edit: Sorry to lead you astray here but the archive format of .backup is apparently proprietary. Thus, HSQL will be necessary to extract the contents of .backup and rebuild .data as Sliderule outlines below. |
Last edited by DACM on Tue Aug 13, 2013 11:12 pm, edited 4 times in total.
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
Re: Data loss in non embedded database
Thanks for the reply,
Im trying to do,
Recover .backup from .data because my .backup. has lesser than .data
because when i open my database, all of my data are all erase
Im trying to do,
Recover .backup from .data because my .backup. has lesser than .data
because when i open my database, all of my data are all erase
Apache Open Office 3.4, 4.0, HSQLDB 1.8(non embedded database) Windows 7, UBUNTU 10.04
Re: Data loss in non embedded database
I will attempt to explain to you what I would do, BUT, I cannot guarantee it will be successful, since, it is very possible that the contents of your your mydb.data and mydb.backup files are the same, and, therefore, bringing back data from the mydb.backup file will not result in any differences, unless, you have kept a SAFE copy of the mydb.backup file.path32 wrote:Thanks for the reply,
Im trying to do,
Recover .backup from .data because my .backup. has lesser than .data
because when i open my database, all of my data are all erase
Please carefully follow these steps:
- Shut down your OpenOffice Base files, and, server if running HSQL as a server. This means, there should be NO mydb.lck file.
- Keep / make safe copies of the following files on your computer:
- mydb.data
- mydb.backup
- mydb.properties
- mydb.script
- Use a text editor, such as Notepad, or whatever, to modify the contents of the mydb.properties file. Line 15 of the file ( at least on my 1.8.0.10 files ) has a line that says:
change it to:Code: Select all
modified=no
That is, just change the no ( if that is the current content of the line ) to a yes .Code: Select all
modified=yes
- Rename ( change the file name ) of mydb.data to mydb.XXdata
The reason for the above is so the database engine ( HSQL ) will 're-create' the mydb.data file from the contents of mydb.backup ( this is what you said you wanted ) . - Below download the zero byte file, mydb.data , place it in your folder with the other mydb.* files. Because it is one byte, the file is a 'dummy' file and will be overwritten with the contents of you mydb.backup after you start your database engine. Because this forum will NOT allow an attachment file with a file type of .data, you will have to rename the file below to: mydb.data
- Start your OpenOffice Base file. The above operation will be performed 'automatically' by the database engine ( hsqldb.jar ).
- You can now check to see if your Tables contains the data you think should be in them.
- Important step: If your database is now working as desired, you want to recover the database file space ( shrink the size of the mydb.data and mydb.backup files ). This is accomplished by:
From the OpenOffice Base file menu: Tools -> SQL...
enter the following command in the Command to execute box:
Code: Select all
checkpoint defrag
- Press the Execute button
- Press the Close button
- Shut down your OpenOffice Base file, and, make safe backups of the four HSQL files ( mydb.* )
- Let the forum know the outcome.
I hope this helps, please be sure to let me / us know.
Sliderule
Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
Last edited by Sliderule on Tue Jul 24, 2012 7:59 pm, edited 2 times in total.
Re: Data loss in non embedded database
Out of curiosity I did a quick search and found information that suggests mydb has a DB file limit of over 2 gigabytes; there were also reports of someone using it with one million records.DACM wrote:Wow, that's a large database (if you're not storing image files in the database)path32 wrote:my problem is, how mydb.backup become 123MB, when my mydb.data is 360MB.
http://www.mghsoft.com/
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Data loss in non embedded database
thanks for the reply,
Sliderule,
i already try that,
this only possible if, the mydb.data is having a bad data than backupdata
and it works, my problem is vice-versa
Sliderule,
i already try that,
this only possible if, the mydb.data is having a bad data than backupdata
and it works, my problem is vice-versa
Apache Open Office 3.4, 4.0, HSQLDB 1.8(non embedded database) Windows 7, UBUNTU 10.04
Re: Data loss in non embedded database
I do not understand what you are saying, so, perhaps someone else can help you.path32 wrote:thanks for the reply,
Sliderule,
i already try that,
this only possible if, the mydb.data is having a bad data than backupdata
and it works, my problem is vice-versa
Sliderule