IBSurgeon IBSurgeon's Blog    IBSurgeon Twitter     IBSurgeon  at SlideShare    IBSurgeon at Scribd      English      Russian       

FBDataGuard: Protecting your Firebird data

IBSurgeon manifest for safe Firebird usage

Choosing safe life

When you choose a car to buy one of the most important features is safety. Some car vendors put safety as the most important benefit of their products. Belts and airbags, dynamic stability and break assist systems - all these things are important parts of modern car.

Of course, choosing the model with advanced safe system does not mean that customers intend to get in crush or drive like crazy; no, this selection means they choose stability and safe life, and they want to decrease chance of circumstances if something happened.

And, as we know from (sometimes very sad) statistics, such approach really help people to survive and save their health when something happens.

Databases as part of our life

It seems obvious that databases are less important than car safety systems... But this is not the fact. I can easily remember when we have corrupted database from children hematology center in Moscow with all analyses results inside, and great hurry of repairing we did for them.

Of course, databases are not always so important as in example above, but very often the whole business, contract commitments, important information and company success itself is based on the database.

What will happen if database will fail for some reason? How to prevent it? How to reduce chance of corruption? Is it possible to embed «airbags» into database system and how effective it will be? How to know that something goes wrong and database environment became dangerous and database is close to corruption?

Is it really SO dangerous?

Is it really so dangerous to drive? Why so many people drive and (as it seems) does not fear to get in crush? Why we have to protect database from corruption or buy safer cars?

Well, it's all about chances and reliability of system. Let's imagine you have 99% uptime of your ERP. Is it a good rate? Don't be too fast to say «yes»: if this is a 24x7 ERP, the 99% uptime means 1% of downtime: as consequence, you can have 3.65 days of downtime during the year. If these 3 days of downtime will happen during Christmas sales or other high season event... It will the cost of 1%, may be too high.

Don't be scary

Actually, Firebird is a very robust system. Firebird is used in many ERPs and other business-critical solutions with databases up to 250Gb (and please keep in mind the fact that Firebird uses compression to store data!) and hundreds of users, on rather modest hardware, and usually run without dedicated DBA support. And Firebird is free

There are few systems which encountered errors, most of all are just running for years. Most corruptions are caused by lack of maintenance or hardware failures. Having regular backups, good hardware, experienced system administrator.. you still have a risk of corruption. If someone gives you the 100% warranty, say to him: «Thanks, God!». It's all about chances, and all chances are about risk, and the only applicable solution for real-life is risk management.

You decide

There is no need to scary people with corruption. Everybody decides personally what level of reliability you need for your application, and the only required thing for database safety is to think about database and create recovery plan for emergency situation. Plan can include rolling back to the latest backup, mirroring with replication or using other solution, whatever - but it should exists. If you don't have recovery plan for your database-based solution you just fool yourself and drive your business into the high-risk zone.

Our solution for Firebird

We kept all above things in mind while developing our «belt-airbag-ESP-DSP» solution for Firebird based systems. And not only. We are in IBSurgeon work with corrupted databases since 2001 and gathered large statistics about corruption and their reasons and circumstances. Very often we saw databases with lot of useful information losses caused by lost of some (relatively small) system information, very often we saw databases corrupted due to lack of space or other misadministration problems, and the most often we thought about solution which can save these data, eliminate most «popular» reasons of corruptions and greatly reduce chances of corruption. It's the origin of FBDataGuard. Many vendors of Firebird-based applications asked us to develop tools to watch and keep database health and prevent form corruptions... because many applications are using in silent, embedded mode, without any DBA or even experienced user attention... and it does not make data inside such databases less valuable.

How it works

FBDataGuard contains several level of database protection. The first level is low-level protection of data. It's like belt and airbags in car – it can't prevent clash, but can reduce damage and save driver's and passenger's lives. At this level FbdataGuard collects low-level system data of database and save them into safe place. If (or better say when?) something happens, FBDataGuard, using saved database image info, can extract useful data even form completely «dead databases»: for example, with completely lost system data or with very big corruption (half of database lost). In essence, FBDataGuard can save from protected database up to 100% of remained data: i.e., if RAID crash will erase each second page of database... FBDataGuard can extract all remained data!

Also, at this level FBDataGuard protects from own hands – if you drop table you can say «Ooops», and it will sound much more optimistic if your database was protected by FBDataGuard.

FBDataGuard can protect several databases even on remote servers using this level of protection.

Preventing corruptions

At second level of protection FBDataGuard watch for possible dangers of corruptions. It monitors disk space and database size growth, system metadata freshness and transaction behaviour. FBDataGuard controls these indicators and sends warnings and advices once it sees something suspicious. We used our knowledgebase and large technical support experience to create the vest collection of advices in FBDataGuard.

Watching database health

Beyond severe corruptions, database can suffer from low performance, periodically slowdowns, problems with indices (including non fresh selectivity) and transactions gaps. If it is left without proper attention it can lead to serious performance degradation and increase corruption chances.

Watching CPU and memory usage and users count help to determine the origin of problem – is it either old application with badly designed transaction management or user who did not turn off application due to maintenance period.

Functionality of our developer products IBTransaction Monitor and IBAnalyst is included into FBDataGuard. Bundled with scheduled maintenance and indicators these function gives much more information about database and help to decide where and when issue raised or just intends to raise.

Database maintenance

Backups and restores are important parts of database lifecycle and, to be honest, are not very interested. Proper approach to automation of this process is not so simple as it seems to be at first look: revolver backups, control restores and reserved old copy in «before-backup state» are first thing to say, but not last.

Nbackup in Firebird and incremental backup in InterBase are another features which require close attention and reliable automation.

All these issues are covered in FBDataGuard to provide easy-to-use and reliable solution for every day maintenance task of Firebird databases.

Controlling many databases

Now it's impossible to take an overall look on several Firebird databases (at different locations) and say – are they Ok? What is the closest maintenance operation scheduled for specific database? What is the size of database, when we need to create new volume or even buy new HDDs?

These questions are all well-known to system administrators of large enterprises and tech support teams which need to watch over many simultaneously running databases, often in mixed environments with other DBMS, and they need really clear and obvious representation of important database information.

FBDataGuard Control Center provides the comprehensive overview of databases' status, details of their lives and health, and, in the end of all, helps to make quick and right solutions to run Firebird databases in fast and smooth way.

Embedding FBDataGuard into applications

Vendors of applications with large databases are certainly interested to have data protection solution, but FBDataGuard can also help to make almost any Firebird-based application more safe and reliable. Embedding FBDataGuard into application does not require any extra work than setting simple configuration file and including its installation to deployment pack. Running both on Windows and Linux (in coming 1.5 version) FBDataGuard can protect data for applications of any size without modification or extra efforts to deploy.

Partner program

For us, as vendors of FBDataGuard and other recovery solution, like FBFirstAID, it is obvious that maximum effectiveness of database protection can be achieved only if necessary steps will be done BEFORE corruption, and not after.

With FBDataGuard we offer to all developers of Firebird-based applications to implement and deliver solutions equipped with protection system. FBDataGuard is user-oriented software which licensed on per server basis, so it's worth to include it into end-user business application, especially business-critical in terms of health and performance. The easy key for this is our partner program to enable developers and vendors include our solution into their with big discounts and use our marketing and promotion materials and support.

If you have any questions please feel free to ask them at support@ib-aid.com

Sincerely yours,

IBSurgeon Team

Articles
Recent news

More News