Database corruption is one of a typical DBA's biggest nightmare . So the question is, what steps can we take to ensure that there are NO corruptions in the database without putting much pressure on system resources? Yes because there are tradeoffs when dealing with database corruption prevention.
So without further ado, here are some precautionary measures that can be taken to prevent database corruption without much stress on the system.
Abruptly shutting down a server could have far reaching consequences on a database as database files could become corrupted. It is therefore important to gracefully shut down the server when necessary.
The importance of database backups cannot be overemphasized. It is important to take database backups for quick disaster recovery.
A failed hardware could corrupt database files. Ensuring that scheduled maintenance is followed through could prevent database corruption.
Proactive database management should be our guiding principle. We should not wait for things to go wrong before swinging into action. Instead we should stick to Murphy's law which states that if things could go wrong, they would probably go wrong. Therefore, we should write and schedule scripts with cron jobs that could not only detect anomalies, but also perform certain updates and optimization. The best way to keep the database's health in top notch is probably by updating to the latest version.
It is a good idea to keep database size and disk space in check because huge databases are more likely to be corrupted than smaller ones. We can use various techniques such as data compression, appropriate data type usage, index optimization etc.to reclaim spaces without negative impact on performance.
More from @sqldibia