Can we compact or repair an interbase database like it exists with a  Microsoft access database ?
Who is Participating?
YodaMageConnect With a Mentor Commented:
Interbase uses utilities to repair corruption. Gfix comes with Interbase. All compacting is done by either sweeping the DB, or through backup and restore through utilities like Gbak, which also ships with Interbase.

There are many good third party tools available which will do these tasks, IB Admin 3, and IB Expert 1.2 are both very good with an easy GUI front end.
As YodaMage said, IB comes with it's own tools for fixing databases. Moreover, there is a lot utilities over there.

Some notes:
- sweep does not shrink (or compact the database). Once a database allocates some space on the disk, it never releases it - deallocating / reallocating disk space is a costly process and may have impact on database performance. Thus the only way to compact the database is to perform backup / restore.


rem Project Backup
cd Program Files\Borland\Interbase\Bin
del D:\User\Data\FridayBk.log
gbak -b D:\User\Data\Friday.gdb D:\User\Data\Friday.gbk -user SYSDBA -password masterkey -v -y D:\User\Data\FridayBk.log
rem Backup End

rem Project Restore
cd Program Files\Firebird\Bin
del D:\User\Data\FridayRs.log
gbak -r D:\User\Data\Friday.gbk D:\User\Data\Friday.gdb -user SYSDBA -password masterkey -v -y D:\User\Data\FridayRs.log -p 4096
rem Backup End

For more info on what the switches mean see IB Operations Guide. There you can also find info on repairing database - this process is specific from case to case and there is no universal solution for every problem. Check the Operations Guide. All the docs and lots of more info is available from


You all set?

Please close question.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.