Reliability
Database Early Warning: How to Know Before Your Users Do
Most teams learn about a database problem from a user. Here are the trends that give real early warning on SQL Server, Oracle and PostgreSQL, what a useful alert says, and what an early-warning review of one production database covers.
Need a hand with this? Talk to a senior database DBA ↓By RadixTrie26 November 20264 min read
Database early warning means knowing about a problem days or weeks before it becomes an outage. Most teams do not have it. They have monitoring, often several tools, and they still hear about trouble from a user on the phone. This article explains why that happens, which trends give real warning on SQL Server, Oracle and PostgreSQL, what a useful alert looks like, and what an early-warning review of one production database covers.
Why teams hear from users first
Infrastructure monitoring answers one question: is the server up? A database can be up and still be minutes from failing. The server responds to a ping while the transaction log has no room left, a replica has fallen hours behind, or a failover happened overnight and nobody was told. The usual reasons are the same everywhere.
- Monitoring stops at the operating system. CPU, memory and disk are watched, but nothing looks inside the database.
- Thresholds are fixed. An alert at 90 percent full tells you the present. It does not tell you that the disk fills in nine days at the current rate.
- Alerts arrive without a recommendation, so they are easy to ignore, and after a few weeks they are ignored.
- Events that are designed to be invisible to users, such as a failover, are also invisible to the team unless something reports them.
- Nobody owns the trend. Each alert is closed on the day, and no one looks at the last three months together.
The trends that give real early warning
Early warning comes from direction and rate, not from a single reading. These are the trends worth watching on any of the three platforms.
- CPU. Not the peak, but how the busy-hour average moves month on month, and which queries account for the growth.
- Memory. Whether the database is under memory pressure more often than it was, and whether the cache holds the working data.
- Storage. Data, log and backup volumes, each with a projected date on which it fills at the current rate of growth.
- Connections. How close the busiest moments come to the configured limit, and whether that gap is shrinking.
- Replication lag. How far a standby or replica falls behind at peak, because that is the data you lose or wait for in a failover.
- Job outcomes. Backups, integrity checks and maintenance that fail, run longer every week or quietly stop running.
- Query behaviour. The handful of statements that are slower this month than last, before anyone complains.
Each platform also has its own slow-burning risks. On SQL Server, a transaction log that cannot be truncated grows until writes stop, and tempdb contention builds with load. On Oracle, a full archive log destination halts the database, and tablespaces fill one segment at a time. On PostgreSQL, tables that are not vacuumed often enough bloat, a disk filled by write-ahead log stops the server, and transaction ID wraparound will eventually force the database to refuse writes if it is left unattended. None of these arrive suddenly. All of them are visible well in advance to someone who looks.
Failover detection: the event that hides itself
High availability exists so that users do not notice a failure. That is its purpose, and it is also the trap. When an availability group, a Data Guard configuration or a PostgreSQL replica set fails over cleanly, the application carries on. If nothing reports the event, the team finds out the next morning, or not at all, and the estate runs with less protection than everyone believes. A role change on any production database should raise an alert to a person within minutes, with the old primary, the new primary and the state of the remaining standby. Our article on high availability and disaster recovery covers why a tested design beats a configured one.
What a useful alert says
A useful alert can be acted on by the person who receives it. Compare two messages about the same server.
- Weak: CPU on the database server is at 85 percent.
- Useful: Busy-hour CPU on the production database has risen every week for six weeks. At this rate it reaches its limit next week. Add CPU now, or move the month-end report to the replica.
The second message names the trend, gives a date and recommends an action. It reaches the right person early enough to schedule the change inside a normal window. That is the difference between monitoring and early warning.
A simple test for your own alerts: does each one say what will happen, by when, and what to do about it? If not, it is a reading, and readings get ignored.
What an early-warning review covers
An early-warning review looks at one production database and answers a plain question: what would you hear about first from a user today? Our engineers do the review in your environment, with read access, and it covers the following.
- What is monitored now, by which tool, and who receives each alert.
- What is not monitored inside the database: log and archive space, replication lag, failed jobs, blocking, failover events.
- Twelve weeks of history, where it exists, for CPU, memory, storage, connections and lag, with projected dates for each limit.
- A test of the failover alert, so you know that a role change reaches a person.
- A short list of alerts to add, change or switch off, each written so that it carries a recommendation.
- A written report, ranked by risk, that a non-specialist can read.
The alerting itself is then set up for your environment and your tools, because no two estates are the same. Where collection is automated, a senior engineer reviews what it finds and approves what is sent to you. A review like this pairs well with a database health check, which looks at the wider state of the estate.
Database early warning: common questions
We already have a monitoring tool. Is that not enough?
Often the tool is fine and the gap is in what it watches and what it says. Most general tools watch the server, not the database, and alert on fixed thresholds. The review shows what to add to the tool you already have.
How far ahead can a database problem be seen?
Capacity problems such as storage, CPU and connections usually show weeks ahead, because they follow growth. Failed jobs and replication lag show within hours. Sudden hardware failure cannot be predicted, which is why failover detection matters.
Does this work for SQL Server, Oracle and PostgreSQL?
Yes. The trends are the same on all three. The specific checks differ, and the review uses the right ones for each platform.
How RadixTrie helps
RadixTrie works on databases and nothing else: SQL Server, Oracle and PostgreSQL. You speak to a senior engineer directly, with no service desk in between. The team shares the context of your environment, so you never depend on one person. We give straight advice, including when the answer is to leave something alone. And we come to you first: when we see a trend that will hurt, you hear it from us before your users do. Early warning is part of our database support and managed DBA services, and a review of one production database is a sensible first step. To start, talk to a senior DBA.
Need a hand with this?
Tell us what you run today and when it has to move. A senior database DBA will reply directly, usually within one working day. Prefer email or phone? Write to expert@radixtrie.com or call +27 10 143 0304, or use the contact page to book a 30-minute call. We provide DBA services in the United Kingdom, United States, Canada and Australia, as well as South Africa.
TAGSDatabase MonitoringEarly WarningCapacity PlanningSQL ServerOraclePostgreSQL
