Quick revision
The short answer
First I would quantify the exposure with DBA_FEATURE_USAGE_STATISTICS on every affected database and bring in the licensing and legal teams before anyone contacts Oracle. Then we either stop the usage, for the packs by setting CONTROL_MANAGEMENT_PACK_ACCESS appropriately and for Partitioning by removing partitioned objects, or buy the licences where the feature is needed. To prevent recurrence we add database build standards, regular feature usage monitoring and an approval step for options, train DBAs and developers that installed does not mean licensed, and use free alternatives such as Statspack and application-level partitioning where they suit.
What to remember
In this answer, we responded to unlicensed use of the Diagnostics Pack and Partitioning by first measuring the exposure with DBA_FEATURE_USAGE_STATISTICS across all databases and involving licensing and legal before any vendor contact. We then stopped the usage, with CONTROL_MANAGEMENT_PACK_ACCESS for the packs and by converting partitioned tables, or bought licences where the features were needed. Prevention came from build standards, weekly feature usage monitoring, an approval step for options, training that installed does not mean licensed, and free alternatives such as Statspack and application-level partitioning.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
First I would quantify the exposure with DBA_FEATURE_USAGE_STATISTICS on every affected database and bring in the licensing and legal teams before anyone contacts Oracle. Then we either stop the usage, for the packs by setting CONTROL_MANAGEMENT_PACK_ACCESS appropriately and for Partitioning by removing partitioned objects, or buy the licences where the feature is needed. To prevent recurrence we add database build standards, regular feature usage monitoring and an approval step for options, train DBAs and developers that installed does not mean licensed, and use free alternatives such as Statspack and application-level partitioning where they suit.
Why this question is asked
Unlicensed use of Oracle options is one of the most common findings in software audits, and it is easy to fall into: the options are installed with the database, they work without any key, and a DBA running an AWR report to solve an incident has no reason to think it costs money. The financial exposure can still be large. Interviewers ask this scenario to see whether we respond calmly and in the right order, and then fix the process rather than blame a person. In this answer, we will go through the response step by step, look at how to stop the usage for each feature, and then design the prevention.
1A Quick Recap: Why This Happens
Oracle Enterprise Edition ships with its options and management packs installed. The Diagnostics Pack, which includes AWR, the automatic workload repository that records performance snapshots, and ASH, active session history, is enabled by default through the CONTROL_MANAGEMENT_PACK_ACCESS parameter. Partitioning lets anyone with the right privileges create a partitioned table. None of this checks a licence. Oracle records feature use inside the database, and in an audit it asks customers to run scripts that read those records.
So the team probably did nothing malicious. Someone generated AWR reports to diagnose a slow query and someone created a partitioned table because it solved a real problem. The response should reflect that.
2Quantify the Exposure Internally
Before anyone talks to Oracle, we need to know exactly what was used, where and since when. The data dictionary view DBA_FEATURE_USAGE_STATISTICS records, per feature, whether it was used, how many times it was detected, and the first and last usage dates. We run it on every database in the estate, not only the one the audit flagged, because the same habits usually exist elsewhere.
With the results we can work out, for each database, the processors it runs on and therefore the licence cost of each feature. Oracle also provides official measurement scripts for audits; the licensing team will know which to use. The point of doing this first is that we understand our position before it is described to us.
3Involve Licensing and Legal Before Vendor Contact
Licence compliance is a contractual matter, so the software asset management or licensing team and legal counsel lead from here. They decide what is shared with Oracle and when, check the contract for the exact terms that apply, and often bring in an independent licensing adviser. Engineers should not send scripts output, emails or admissions to the vendor directly, however helpful that feels; an off-hand statement can widen the scope of a negotiation.
Our job as engineering is to provide accurate facts quickly: which databases, which features, which processors, what the usage was for, and whether it is still needed.
4Stop the Usage or License It
For each feature we decide whether we need it. Where we do, buying the licence is the honest and often the cheapest outcome. Where we do not, we stop the usage and keep evidence of the date.
- Run DBA_FEATURE_USAGE_STATISTICS everywherewhat, where, since when
- Hand facts to licensing and legalno direct vendor contact by engineers
- Is the feature needed?YesBuy the licenceNoStop the usage and record the date
- Packs: CONTROL_MANAGEMENT_PACK_ACCESSNONE on unlicensed databases
- Partitioning: convert or drop partitioned objectsplan it as a migration
- Put prevention in placestandards, monitoring, approval, training
6 steps in order. Play them, or step through them one at a time.
Partitioning is harder to stop than the packs, because the feature lives in the data: a partitioned table keeps counting as usage. We must convert the tables back to non-partitioned ones, which needs a migration plan, or buy the option. Older releases also had a tool, chopt, to disable some options in the binaries; check your version for what it supports. Note that historical usage remains recorded in DBA_FEATURE_USAGE_STATISTICS even after we stop, which is why the dates and evidence matter in the negotiation.
5Preventing Recurrence
Prevention works at three levels. Build standards: every new database is created from a template that sets CONTROL_MANAGEMENT_PACK_ACCESS according to what that database is licensed for, and grants application schemas only the privileges they need. Monitoring: a scheduled job collects DBA_FEATURE_USAGE_STATISTICS from every database weekly, compares it with what each database is licensed for, and alerts the DBA team and the licensing team on any new paid feature, so a mistake costs a week of usage instead of years. Approval: using an option becomes a change request that the licensing team signs off, like any other purchase.
Training is the fourth part, and the one that addresses the root cause. DBAs and developers need to know that installed does not mean licensed, and which everyday actions count as use: running an AWR or ADDM report, querying V$ACTIVE_SESSION_HISTORY or DBA_HIST views, using the SQL Tuning Advisor, creating a partitioned table or a compressed table. A one-page list in the team's runbook prevents most accidental use.
6Free Alternatives That Cover the Need
Often the need behind the feature can be met for free. Statspack, which ships with the database, gives periodic performance snapshots and reports similar to AWR, less detailed but enough for most diagnosis. Application-level performance data, from tracing and metrics in the Java services, answers many of the questions people used AWR for. Instead of database partitioning, an application can split data into separate tables by period, for example events_2026_10 and events_2026_11, with a view or routing logic on top, and drop old tables to purge; it is more work in code but needs no option. Where the feature saves more than it costs, licensing it is the right answer, and that is a business decision the approval process now makes visible.
7Follow-up questions
Does querying the AWR views count as use even without generating a report?
Yes. Oracle's licensing documentation treats access to the AWR and ASH views, not just the report scripts, as use of the Diagnostics Pack. Many monitoring tools query those views by default, which is a common hidden source of usage, so third-party tools must be configured for unlicensed databases.
Would you remove the evidence of usage?
No. Tampering with usage records would be dishonest and could make the legal position far worse. We stop the usage going forward, keep a clear record of when and why it happened, and let the licensing and legal teams negotiate on accurate facts.
Who should own licence compliance long term?
The software asset management or licensing team owns the entitlements and the relationship with the vendor, and the database platform team owns the technical controls and monitoring. Both need to be named, with the weekly feature usage report as the shared check between them.
8Conclusion
In this answer, we responded to unlicensed use of the Diagnostics Pack and Partitioning by first measuring the exposure with DBA_FEATURE_USAGE_STATISTICS across all databases and involving licensing and legal before any vendor contact. We then stopped the usage, with CONTROL_MANAGEMENT_PACK_ACCESS for the packs and by converting partitioned tables, or bought licences where the features were needed. Prevention came from build standards, weekly feature usage monitoring, an approval step for options, training that installed does not mean licensed, and free alternatives such as Statspack and application-level partitioning.
Open with
I would respond in a fixed order. First, measure internally: run DBA_FEATURE_USAGE_STATISTICS on every database, not only the flagged one, to see which paid features were used, how often, and the first and last dates, and map that to the processors each database runs on.
Then, if they want more
Second, hand those facts to the licensing team and legal before anyone talks to Oracle, because this is a contractual negotiation and engineers should not send output or admissions to the vendor directly. Third, for each feature decide whether we need it. If yes, buying the licence is the honest outcome.
If not, we stop the usage: for the Diagnostics and Tuning Packs, set CONTROL_MANAGEMENT_PACK_ACCESS to NONE on unlicensed databases; for Partitioning there is no switch, so we convert the partitioned tables back as a planned migration. Then prevention.
Database build templates set the pack parameter to match the licence, a weekly job collects feature usage from every database and alerts on any new paid feature, and using an option needs an approval from licensing.
I would also train DBAs and developers that installed does not mean licensed, with a short list of actions that count, like running AWR reports or querying ASH views, including through monitoring tools. And I would offer free alternatives: Statspack instead of AWR, and application-level partitioning by period where it fits.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- PostgreSQL documentation, MySQL reference manual
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "An internal audit found that a team enabled an Oracle feature (Diagnostics Pack AWR...": https://scrivio-interview-library.netlify.app/databases/oracle-and-sql-server/e11e2228eb/