|
INTERVIEW QUESTIONS
DATABASE
FIREBIRD
DETAILS
Question: How to repair a corrupt Firebird database?
Answer: Here's a short step-by-step walkthrough:
* disconnect users and disable incoming connections to the database * make a copy of database file (or two copies) and work on that * use GFIX with -v option to validate the database file * use GFIX with -v and -f to do full validation
If problem is not too serious, you can try to backup the broken db and restore under a new name:
* use GFIX -mend to prepare corrupt database for backup * use GBAK -b -g to backup the database. -g disables garbage collection (FAQ #41) * use GBAK -c to restore backup to a new database.
If you succeed, you have fixed the problem and have a functional database. If not, you can try to create an empty database with the same structure and pump the data to it.
One of the reasons why backup or restore can fail is if some broken database triggers exist, and prevent connection to the database. For example, a database trigger might use some table which has a broken index, etc. To work around this, connect to database with isql tool using -nodbtriggers option and then disable those triggers. You can enable them later when you fix other problems and get a working database again.
|
|
|
Category |
Firebird Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8735 users |
Added on |
7/23/2015 |
Views |
67488 |
Rate it! |
|
|
Question:
How to repair a corrupt Firebird database?
Answer:
Here's a short step-by-step walkthrough:
* disconnect users and disable incoming connections to the database * make a copy of database file (or two copies) and work on that * use GFIX with -v option to validate the database file * use GFIX with -v and -f to do full validation
If problem is not too serious, you can try to backup the broken db and restore under a new name:
* use GFIX -mend to prepare corrupt database for backup * use GBAK -b -g to backup the database. -g disables garbage collection (FAQ #41) * use GBAK -c to restore backup to a new database.
If you succeed, you have fixed the problem and have a functional database. If not, you can try to create an empty database with the same structure and pump the data to it.
One of the reasons why backup or restore can fail is if some broken database triggers exist, and prevent connection to the database. For example, a database trigger might use some table which has a broken index, etc. To work around this, connect to database with isql tool using -nodbtriggers option and then disable those triggers. You can enable them later when you fix other problems and get a working database again. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How to reorder the table columns (fields)?
|
View Answer
|
|
How to recreate the index on a Firebird table?
|
View Answer
|
|
How to pump the data from one database to another?
|
View Answer
|
|
How to prevent firebird.log file from filling up the disk partition?
|
View Answer
|
|
How to disconnect the user connection?
|
View Answer
|
|
How to do replication of Firebird databases?
|
View Answer
|
|
How to drop all foreign keys in database?
|
View Answer
|
|
How to export data from database and import into another?
|
View Answer
|
|
How to extract metadata for the entire database?
|
View Answer
|
|
How to get a list of tables, views and columns in Firebird database?
|
View Answer
|
|
How to load a file into database column?
|
View Answer
|
|
How to lock records in a table?
|
View Answer
|
|
How to migrate Paradox, dBase or FoxPro database to Firebird?
|
View Answer
|
|
How to monitor Firebird server activity?
|
View Answer
|
|
How to move a multi-file database?
|
View Answer
|
|
How to open the database in exclusive mode?
|
View Answer
|
|
How to pipe multiline string to isql?
|
View Answer
|
|
How to determine who is and change the owner of database?
|
View Answer
|
|
How to detect the server version?
|
View Answer
|
|
How to detect applications and users that hold transactions open too long?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Firebird Interview Questions & Answers - Exam Mode /
Learning Mode
|