How can I improve our production InterBase database server?
2 comments. Current rating: (2 votes). Leave comments and/ or rate it.
Question:Our company's production database is running on InterBase on Windows XP. I worry what happens if that Windows machine goes down (disk crash, Windows crash).
How can I improve availability of our production InterBase database server?
Answer:Despite its bad reputation, Windows - and in particular Windows XP - can be a solid server operating system if you are talking about a dedicated machine, locked in a server room.
Such a machine would not be subject to random installations to try out "some new software".
However, any machine can fail - a hard disk can crash, you can have an electric outage and your USV may not work.
Normally you would make daily backups (depending on frequency of updates in your situation) and in case of a hardware failure, restore from yesterday's backup.
Your downtime would be maybe an hour, including the time to get a second machine ready.
A great way to increase availability is to create a shadow of the database. Shadows are exact duplicates of the database. The purpose of shadows is to protect you from hardware failure. First you have to set up one or more shadows on sepaate diskss or better still, a separate machine. Then, when your primary disk or primary server breaks down, the users can reconnect to the shadow after you enable it.
Your downtime could be only a few minutes - much less than restoring from a backup.
Shadows can also be composed of multiple files just like normal databases.
The major drawback to shadows is that they increase the number of writes the database server does. If you have only one shadow then every write is duplicated. Two shadows and every write is tripled. This can cause performance problems. It gets slower if the shadow is on a remote machine - which on the other hand would help you if a major catastrophy like an earthquake hits your facility.
Here quickly how to create a shadow (see your InterBase manual):
Shadowing begins with the creation of a shadow, using the CREATE SHADOW statement. This statement has the following syntax:
CREATE SHADOW shadow_number [AUTO | MANUAL] [CONDITIONAL] shadow_filename
The shadow number identifies a shadow set that collects the primary shadow file and any secondary files together. The most important function of the shadow number is to identify the shadow if you decide to drop it (please refer to Deleting a Shadow).
This can be performed without affecting users at all, as it does not require exclusive access. Before creating the shadow, the following should be considered: