DelphiFAQ Home Search:

How can I improve our production InterBase database server?


comments2 comments. Current rating: 5 stars (2 votes). Leave comments and/ or rate it.


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?


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:
  1. Shadow location: a shadow should be created on a different disk from the main database, as shadowing is intended as a recovery mechanism in case of disk failure. Therefore storing the main database and the shadow on the same disk defeats the whole purpose of shadowing!
  2. Distributing the shadow: a shadow can be created as a single-file (shadow file) or as multiple files (shadow set). To improve space allocation and disk I/O, each file in a shadow set may be placed on a different disk.
  3. User access: if a shadow becomes unavailable, user access to the database can be denied until shadowing is resumed, or access can be allowed (i.e. work can continue as normal) although any changes made during this period will obviously not be shadowed. Please refer to auto mode and manual mode for further information.
  4. Automatic shadow creation: To ensure that a new shadow is automatically created, create a conditional shadow. Please refer to conditional shadows for further information.

Content-type: text/html


2006-02-17, 05:02:33
anonymous from United Kingdom  
2009-06-08, 17:19:07
[hidden] from Salem, United States  
Anonymous from Morocco

OK Morocco
What point are, You trying to make by posting that copy of
what, I wrote on this thread all over this site ?
Then only speak what, I believe to be French ?
What are, You playing at ?
If, You have something to say to me then say it.
Don't play like a child and post things all over this site.
I guarantee, You will not be able to keep doing that for very long
if, You choose to keep doing it.

Agent 86 Maxwell Smart \\'^o^'//

To everyone else this Morocco idiot copied and pasted
my words from the Bill Dorsen thread.




NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: