Sunday, July 29, 2012

GCHS Batch 87 Reunion

Hard to believe it has been 25 years since we left the gates of Grace Christian High School!  But thanks to the selfless efforts of a few batchmates, several of us got together last night at Chivz in Greenhills for a night of fun and memories.

From GCHS Batch 87 Reunion

It was fun trying to figure who is who after all these years.  Some classmates still looked exactly the same, while others, err..., have "matured" more.  hehehe.  Section 3 (my section) was the most represented (thanks, classmates).  Lets hope the next reunion will not take another 25 years!

Wednesday, July 4, 2012

Importing and Exporting Data across Firebird Databases

In the past couple of weeks, I've encountered a few problems with the Firebird databases that I maintain.  In both cases, I had to retrieve data from a backup and restore it to the one running in production.

Firebird does not come with any built-in utility to do that function.  Thankfully, as with majority of open source projects, there are 3rd party solutions that seem to do what you want.  In this case, I found FBExport:

The command-line syntax is very straightforward.  First, you extract:

fbexport -S -H hostname -D database1.gdb -U username -P password -F file.fbx -Q "select * from sometable"

Then, you import:

fbexport -I -H hostname -D database2.gdb -U username -P password -F file.fbx -Q "INSERT INTO sometable(field1, field2, field3)"

It works great!