Why do I get error message 'object XYZ is in use' while restoring?


This is a combination of multiple problems with older (1.x) versions of Firebird. The first problem is that users could connect to the database while it was restoring. The second problem is that there were operations like creating of foreign keys which required exclusive access to database. So, if someone connects to the database while you are restoring it, you are no longer the only user and restore of foreign keys fails. Similar problem can occur with other objects if that other user starts using the database while it is restoring.

A common practice to work around this is to always restore database to a temporary file and rename the file when you're done. Deleting/renaming the original database file before starting the restore is also recommended as users might try to work on them (on the old database) while you restore and that data will be gone later. Disabling connections to the server using firewall is also a good alternative, unless you have local connections (from web application for example).

Firebird 2 is much better as it locks users out while database is restoring and also allows creation of foreign keys without exclusive access.


Do you find this FAQ incorrect or incomplete? Please e-mail us what needs to be changed. To ensure quality, each change is checked by our editors (and often tested on live Firebird databases), before it enters the main FAQ database. If you desire so, the changes will be credited to your name. To learn more, visit our add content page.



All contents are copyright © 2007-2024 FirebirdFAQ.org unless otherwise stated in the text.


Links   Firebird   News   FlameRobin   Powered by FB: Home Inventory   Euchre  
Add content   About  

Categories
 Newbies
 SQL
 Installation and setup
 Backup and restore
 Performance
 Security
 Connectivity and API
 HOWTOs
 Errors and error codes
 Miscellaneous