PII Discovery: How to Find Sensitive Data Across All Your Databases
You can't protect data you don't know you have. PII discovery is the unglamorous first step of any real governance program. Here's how it works and how to do it well.
Team Qarbix · · 5 min read
Security & Compliance

Ask a security team where their customer PAN numbers are stored and you'll often get a confident answer that turns out to be incomplete. Yes, they're in the customers table — and also in an old signup_events log, and in a free-text notes field where an agent once pasted one, and in a reporting table nobody remembers building. You can't protect data you don't know you have, which is why every serious governance program starts with the least glamorous step of all: finding the sensitive data in the first place.
This is a practical look at PII discovery — what it is, how it works, where it trips people up, and how to keep the answer accurate over time.
What PII discovery actually is
PII discovery is scanning your databases to find and classify personal and sensitive data, then producing an inventory: which tables, which columns, what category of data, in which systems. The output is a map — "here is every place we hold something regulated" — and that map is the foundation everything else stands on. Access policies, masking rules, compliance reports: all of them need to know what's sensitive and where it lives before they can do anything.
Skip discovery and you're protecting what you remember, not what you have. The gap between those two is exactly where breaches and audit findings hide.
How it works
Discovery tools combine a few techniques, because no single one catches everything:
Pattern matching. Many sensitive types have recognisable formats — an email, a PAN, an Aadhaar number, a card number, an IFSC code. A scanner can match these in the actual values with good accuracy.
Column-name hints. A column called email or pan_no is a strong signal, though names lie often enough that you can't rely on them alone.
Sampling. The scanner reads a sample of real values and classifies based on what it sees, which catches sensitive data hiding in vaguely-named or free-text columns.
Custom patterns. Every industry has its own sensitive fields. Good discovery lets you define patterns for the data that matters to you specifically.
The combination matters. Column names alone miss the notes field full of pasted PII; pattern matching alone struggles with data that has no fixed format. Used together, they catch far more.
Where teams get surprised
Almost everyone who runs discovery for the first time finds sensitive data somewhere they didn't expect. The usual hiding spots:
Logs and event tables. Sign-up events, audit tables, debug logs — full of personal data that was never meant to be a permanent store.
Free-text fields. Notes, comments, descriptions. People paste anything into a text box, including things that should never have been there.
Copies and exports. That CSV someone loaded into a reporting database, the backup table from a migration, the dev database restored from prod.
Forgotten tables. Schemas accumulate. Old tables linger with real data and no owner.
None of these show up if you're working from a mental model of "where we keep customer data." They show up when you scan.
The mistake that makes discovery useless
Here's the one that bites: treating discovery as a one-time project. A team scans, produces a beautiful inventory, ticks the box — and the day after, a developer adds a column, a new table appears, and the inventory starts going stale. Six months later it's fiction.
Discovery has to be continuous. Run it on a schedule and after significant schema changes, so the map keeps up with reality. An inventory that's accurate today and ignored thereafter is barely better than no inventory at all, because people will trust it precisely when it's wrong.
From discovery to protection
Finding sensitive data is step one; the point is to protect it. That's where discovery feeds directly into the rest of governance — and why it's most useful when it's part of a platform rather than a standalone scan that produces a report nobody acts on.
Qarbix DataGuard treats discovery as the front door to governance. Its classifiers recognise sensitive fields out of the box, including Indian PII like PAN, Aadhaar and IFSC alongside standard categories, and custom patterns extend that to your own data. Crucially, what it discovers flows straight into action: a newly found PII column can be masked and access-controlled, and every access to it logged, without a separate hand-off. Discovery on a schedule keeps the inventory honest; the same platform turns that inventory into enforced protection rather than a PDF that ages on a shelf.
Frequently asked questions
What is PII discovery? Scanning your databases to find and classify personal and sensitive data — names, emails, PAN, Aadhaar, card numbers, health data — and producing an inventory of where it lives.
Why is it the first step in governance? Because you can't apply access control, masking, or reporting to data you don't know exists. Discovery produces the map, and usually finds data in unexpected places.
How does it work? By combining pattern matching on values, column-name hints, sampling of real data, and custom patterns for industry-specific fields, then re-scanning on a schedule.
How often should you scan? Continuously — on a schedule and after significant schema changes — so your inventory stays accurate instead of going stale right after the first scan.
Tags
#database change management, #database DevOps, #database security, #database governance
Written by Team Qarbix, the engineers who build CloudLens and DataGuard.