Editorial photograph of a server room and database monitoring screens during an Oracle LMS review
Oracle / Audit Defense

The Oracle LMS script run. On your terms.

Oracle asks you to measure yourself and return the file. Which script arrives, what it touches, how to run it safely, and what to capture before you release anything.

Contact Us Oracle Practice
500+Enterprise clients
$2B+Under advisory
Industry Recognized
500+ Enterprise Clients
$2B+ Under Advisory
11 Vendor Practices
100% Buyer Side Independent

Oracle's data collection script is not a form. It is an evidence gathering event that runs inside your estate, on your privileges, on a date you choose, and it produces the file that becomes the audit. What you do in the two weeks around that run decides most of the claim.

Key takeaways

  • A database collection is rarely one script. It is normally three artifacts: a SQL collection, an operating system or virtualization declaration, and a server worksheet you fill in by hand.
  • The worksheet is where most money is lost. The script is measured, the worksheet is self declaration, and it is the only part where you can hand Oracle servers it could not otherwise reach.
  • Forcing an on demand feature usage sample writes a brand new row dated today. Never trigger one inside an audit window.
  • The background sampling job runs roughly weekly by default, so usage from the last few days may not be in the views yet. That is a fact to know, not a clock to game.
  • On a multitenant database the collection must run in the root and in every pluggable database. A partial run invites Oracle to extrapolate, and extrapolation always rounds against you.
  • Never grant Oracle a database account and never let an Oracle engineer run the script. A DBA with SELECT_CATALOG_ROLE can produce identical output under your control.
  • Never clear, truncate, or reset the usage views. It is falsification, and it deletes the very rows that would have shown a feature was used once in 2019 and never again.

Oracle License Management Services, now generally operating as Global Licensing and Advisory Services, does not audit by inspection. It audits by asking you to measure yourself and return the measurement.

That distinction matters more than anything else on this page. The collection is an event you control, and control is the only leverage you get before the finding letter.

Vera AI · 30 day free trial
Audit letter on the desk? Get your position in minutes.
  • Your agreements decoded into plain English before the auditor interprets them for you
  • Coverage grid: liability caps, IP protections, and SLAs checked in one pass
  • A defensible position paper generated in minutes, not weeks
Try Vera AI free →Free 30 day trial · decode one contract free, no signup

What is Oracle actually asking you to run?

Oracle asks for a package, not a script. A database collection normally arrives as three separate artifacts, and buyers routinely treat only the first one as the audit.

The three artifacts in a database collection

  • The SQL collection. A plain text script your DBA runs against each instance. It queries data dictionary and dynamic performance views and writes structured output files.
  • The operating system or virtualization declaration. Sometimes a shell script, sometimes a request for hypervisor exports, sometimes both. This is where cluster and host topology enters the record.
  • The server worksheet. A spreadsheet you complete by hand: server names, processor models, core counts, environment type, cluster membership, and user population.

Only the first artifact is measurement. The other two are declaration, which means they are written by you and can be written badly.

Which script version, and why the version matters

Ask for the script by name and version before you agree to anything. Oracle's collection scripts change between releases and between database versions, and a script written for a 12c estate can behave differently on 19c or 23ai.

Record the exact filename, file size, and a SHA256 hash of what you received, plus who sent it and when. If a finding later fails to reconcile, that record is the only way to establish which code produced which number.

The three artifacts, and who is actually exposed by each

Artifact Nature Where the money moves Who should own it
SQL collectionMeasured, objectiveOption and pack usage rowsDBA, supervised
Host or hypervisor dataMixedCore counts and cluster reachInfrastructure plus licensing
Server worksheetSelf declarationScope, environments, user countsLicensing lead, never a DBA alone
Covering noteYour argumentFrames every ambiguous rowLicensing lead plus counsel

The review that is not called an audit

Not every collection request arrives with the word audit in it. Oracle also runs license reviews, health checks, and advisory engagements that use the same scripts and feed the same analysis engine.

Treat a soft review exactly as you would treat a formal notice. The only reliable difference is the contractual clause being invoked, so read that first and see our Oracle audit letter triage guide for the first 30 days.

What does the script touch on your servers?

The database collection is read only against the data dictionary. It queries catalog views and dynamic performance views, and it does not read your application tables.

The views it reads

  • DBA_FEATURE_USAGE_STATISTICS. The sampled history of which tracked features have been exercised, with first and last used dates and a detected usage count.
  • DBA_HIGH_WATER_MARK_STATISTICS. Peak values such as maximum sessions, maximum datafile size, and maximum partitioned tables.
  • V$OPTION and DBA_REGISTRY. Which options are linked into the binary and which components are installed, which is a very different question from whether you used them.
  • V$LICENSE, DBA_USERS, V$INSTANCE, V$VERSION. Session high water marks, account inventory, instance identity, and patch level.

Our companion page on reading LMS script output column by column takes those views apart row by row. This page stops at what the run touches.

What it does not read, and the objection that wastes your credibility

The collection does not read customer data, table contents, or business records. Arguing that it does will cost you standing with the auditor and with your own legal team.

What it does capture is worth naming precisely: database account names, schema names, hostnames, instance names, database link names, and directory paths. In some jurisdictions account names are personal data, and hostnames plus link names disclose architecture you may hold under other confidentiality obligations.

The scope problem: instances, containers, and clones

A single run against one instance is not a complete picture, and an incomplete picture is worse for you than a complete one. Oracle fills gaps by extrapolation, and extrapolation is not generous.

  • Real Application Clusters. Feature usage is recorded per instance. Run against every instance, not just the one your DBA happened to be logged into.
  • Multitenant. Rows exist in the root container and in each pluggable database. Collect from CDB$ROOT and from every PDB, including unplugged ones you intend to keep.
  • Clones and refreshes. A test database refreshed from production inherits production usage history. That is how a development server acquires a first used date for a priced option nobody ever ran there.
  • Decommissioned but still installed. Software that is installed and not running still sits in scope under Oracle's standard position. Uninstall properly or expect it in the count.

How do you run the collection without making your position worse?

Run it yourself, once, under change control, after you have read the script. Every part of that sentence is a control that buyers regularly skip.

Never grant Oracle an account

There is no situation in which Oracle needs database credentials to complete a collection. A DBA with SELECT_CATALOG_ROLE and read access to the relevant dynamic performance views produces byte identical output.

Granting an Oracle engineer interactive access converts a bounded measurement into an unbounded one. It also destroys your ability to say what was run and when.

Read the script before you run it

The collection is plain SQL and can be read in an hour by any senior DBA. You are looking for four specific things.

  1. Any DML or DDL at all. A measurement script has no business writing to your database.
  2. Any call that triggers a fresh feature usage sample, including DBMS_FEATURE_USAGE_INTERNAL.EXEC_DB_USAGE_SAMPLING.
  3. Any call into an advisor package, because invoking a tuning advisor can itself register Tuning Pack usage.
  4. Anything that runs against production during business hours with an unpredictable cost, such as unbounded segment level queries on a very large estate.

The sampling trap, and why you must not touch it

Feature usage is not recorded continuously. A background process samples the database on an interval that defaults to roughly seven days, and each sample writes a dated row into the usage view.

This creates a trap in both directions. Forcing an on demand sample writes a new row dated today, and if anything is running at that moment you have just manufactured evidence inside the audit window.

Sequence: remediate first, then measure

If you find unlicensed option usage before Oracle asks, the right order is remediate, document, then let the estate settle. Turning off a feature does not erase history, but it stops the clock and it changes the currently used state on the next sample.

Once a formal notice is in hand the calculus changes. Remediation after notice is still worth doing for future periods, but you must disclose the change and its date, and you should expect the audited period to be measured as it was.

Cover of the Redress Compliance Oracle white paper

White Paper · Oracle Database

Oracle LMS Audit Scripts

Read the audit before Oracle does. Read it free.

Read the white paper

What should you capture in parallel to the run?

Capture everything that will let you rebuild the run without Oracle's cooperation. The auditor keeps their own copy of the output. If you do not keep yours, every later conversation happens on their evidence.

The run manifest

Write one row per instance, at the time of the run, in a file nobody edits afterwards. It takes a DBA about ten minutes per instance and it has settled disputes worth six figures.

  • Script filename, version string, byte size, and SHA256 hash, plus the email that delivered it.
  • Instance name, host, database version and patch level, container name, and whether the instance is production, test, development, or standby.
  • Database time at start and end of the run, and the operating system user and database user that executed it.
  • The value of CONTROL_MANAGEMENT_PACK_ACCESS at run time, along with the other licensing relevant initialization parameters.
  • Physical core and socket counts read from the operating system, not from the database, and the hypervisor version where relevant.
  • A copy of the unmodified output files, stored where the audit team can reach them and nobody else can overwrite them.

The evidence that exonerates, gathered while it still exists

Most defensible arguments rest on evidence that ages badly. Job histories roll over, ticket systems archive, and the consultant who ran a one time test in 2021 leaves the company.

Collect the supporting material in the same window as the run, not after the finding letter arrives.

  • Scheduler and job history showing which automatic tasks were enabled and when.
  • Change tickets for any option that was enabled, tested, and disabled, with dates and approvers.
  • The initialization parameter history, which shows when pack access was set and by whom.
  • Refresh and clone records, which explain inherited usage dates on non production databases.
  • Named user evidence: the human resources headcount, contractor lists, and the account reconciliation that separates service accounts from people.
The script is the only part of an Oracle audit that tells the truth by accident. Everything around it, including your own worksheet, is written by people with an interest in the answer.

Which findings should you expect before you open the file?

Expect four or five, and expect most of them to be defensible. Knowing them in advance changes the run from a discovery exercise into a verification exercise.

Management packs and the parameter that causes them

Diagnostics Pack and Tuning Pack are the most common findings on Enterprise Edition, and the reason is a single initialization parameter. CONTROL_MANAGEMENT_PACK_ACCESS ships with a default that enables both.

Set to NONE, the database blocks the pack features and stops recording new usage. Set to DIAGNOSTIC, only the Diagnostics Pack is available. Left at the default, the automatic workload repository runs and records usage nobody consciously asked for.

Partitioning, compression, and the default that is not a choice

Partitioning frequently shows usage on databases where no application table is partitioned, because Oracle managed dictionary objects are themselves partitioned. Oracle's own partitioning policy document is the reference, but the raw file does not distinguish your intent from a product default.

Advanced Compression behaves the same way. Basic table compression is included with Enterprise Edition, while advanced row compression is not, and the usage row does not always make that distinction obvious on its face.

Expected findings, and what you should have ready before the run

Expected finding Usual real cause Evidence to have ready
Diagnostics Pack usedPack access parameter left at defaultParameter history, AWR retention settings
Tuning Pack usedSQL tuning advisor invoked once, often by a scriptAdvisor task owner and date, change ticket
Partitioning usedOracle managed dictionary objectsList of partitioned objects by owner
Advanced Compression usedSecure file or basic compression misreadCompression type by segment
Advanced Security usedNetwork encryption defaults on a patched releaseNetwork configuration files with dates
Option present in V$OPTIONLinked into the binary, never usedZero usage rows in the feature usage view

Reading those rows properly is a separate discipline and we have written it up separately. Start with the run controls on this page, then move to the column by column interpretation guide once the file exists.

What each finding is worth if it sticks

Findings are priced from Oracle's global price list, then multiplied by processor count, then loaded with backdated support. A single option on a modest cluster routinely lands as a seven figure opening claim.

The arithmetic and the prerequisite chains are set out in our page on Enterprise Edition options as a priced audit risk, which is the right place to model the bill before you run anything.

Editorial photograph of a database administrator reviewing Oracle feature usage output on a monitor
The collection records that a feature ran, never why. The why is written by whoever submits the file with a covering note, which is why the covering note is not optional.
3
Artifacts in a typical collection
7
Days between usage samples by default
2 to 3
Weeks of review before release

Source: Redress Compliance advisory engagement file

Where the common advice on running the LMS script is wrong

The common advice is to stall: delay the run, argue about scope, and give Oracle as little as possible for as long as possible. That advice is half right and it costs people money.

Delay is only leverage when you are using the time. Buyers who stall without preparing arrive at the same run three months later with the same unmeasured estate, a worse relationship, and a shorter runway to the renewal Oracle has been holding in reserve.

The stronger posture is the opposite. Agree a scope in writing, then run the collection early and completely on your own terms.

Hold the output for the two to three weeks it takes to reconcile it. You then arrive at the first finding meeting knowing the number better than the auditor does, and that is the only position from which a claim actually falls.

How do you review and release the output before Oracle sees it?

Treat release as a gate with named approvers, not as an email. Once the file leaves your network you cannot unsend it, and every later argument is uphill.

The release gate

  1. Completeness. Every in scope instance and container present, every run accounted for in the manifest, no failed runs quietly omitted.
  2. Scope. Every included server matched to the audited legal entity, agreement, and period. Anything outside that scope comes out before release.
  3. Accuracy. Core counts, socket counts, and environment classifications checked against the operating system and the asset register, not against the worksheet author's memory.
  4. Redaction. Account names, hostnames, and link names reviewed against your data protection and confidentiality obligations, with any redaction logged and explained.
  5. Interpretation. Every ambiguous row traced to a cause, with the supporting evidence attached rather than described.
  6. Approval. Signed off by the licensing lead, the DBA lead, and counsel. Transmitted by a single named person through an agreed channel.

The covering note, and why it is the highest value hour you spend

Send the output with a short written interpretation, not naked. Two pages is enough: scope statement, method, known defaults and their causes, points of disagreement, and the evidence index.

A covering note does not change the data. It changes who is arguing from a position and who is arguing from a spreadsheet. See our Oracle audit response letter guide for the wording that has held up.

When to bring in a specialist

Bring in independent help when the estate spans virtualization, when multiple priced options appear, or when the audit sits within twelve months of a renewal. Those three conditions are where the claim and the renewal become the same negotiation.

Suggested reading

What should a buyer do next?

  1. Read the audit or review clause in the agreement Oracle has cited, and write down the legal entity, the programs, and the period it actually covers.
  2. Ask Oracle in writing for the script by name and version, and for a statement of what each artifact collects.
  3. Hash and archive exactly what you receive, then have a senior DBA read the SQL for DML, sampling calls, and advisor calls.
  4. Agree the instance list in writing before anything runs, and confirm that nothing outside the audited scope will be collected.
  5. Run the collection yourself under change control, across every instance and every container, on one date you record.
  6. Complete the run manifest and gather the exonerating evidence in the same window, while job histories and tickets still exist.
  7. Complete the server worksheet with the licensing lead, never with a DBA alone, and challenge every declaration that widens scope.
  8. Hold the output for two to three weeks, reconcile every row to a cause, and pass the interpretation work to the column by column guide.
  9. Release through a named gate with a covering note, then prepare for the settlement conversation using our Oracle audit negotiation tactics.
  10. Engage independent Oracle advisory before the file leaves your network, not after the finding lands.
Cover of the Redress Compliance Oracle white paper

White Paper · Oracle Database

Oracle LMS Audit Scripts

Read the audit before Oracle does. Read it free.

Read the white paper
Need help? Try our AI agents. Ask the Oracle licensing AI agent → Scoped to one vendor and one problem. Runs in your browser.

Frequently asked questions

Can I refuse to run the Oracle LMS audit script?

Usually not outright, because most Oracle agreements contain an audit clause that obliges reasonable cooperation. What you can do is negotiate the scope, the timing, the method, and who runs it. Refusing entirely tends to escalate; negotiating the terms of the run almost always succeeds.

What privileges does the Oracle collection script need?

Read access to catalog and dynamic performance views, which SELECT_CATALOG_ROLE normally provides. It does not need SYSDBA for the standard database collection, and it never needs an account created for Oracle. If someone asks for more, ask them to point at the specific view that requires it.

Should we let an Oracle engineer run the script for us?

No. The output is identical when your own DBA runs it, and running it yourself preserves your record of what was executed, when, and against what. Handing over interactive access converts a bounded measurement into an open ended one you cannot reconstruct.

Does running the script itself create new usage records?

The standard read only collection does not, but related actions can. Forcing an on demand feature usage sample writes a new row dated today, and invoking a tuning advisor to investigate a finding can register Tuning Pack usage. Read the script and control what else runs that week.

Can we clear the feature usage views before submitting?

No. Clearing or resetting the views is falsification of audit evidence and breaches the audit clause you are operating under. It also destroys your own defense, because those rows carry the dates that prove a feature was used once years ago and never since.

What is the biggest mistake buyers make during the run?

Letting a DBA complete the server worksheet alone. The SQL collection is measured and objective, but the worksheet is self declaration, and a well meaning engineer will happily declare an entire virtualization cluster that Oracle could never have discovered on its own.

How long should we hold the output before sending it?

Two to three weeks is realistic for a mid size estate. That time is spent tracing every ambiguous row to a cause, gathering evidence that is still retrievable, and reconciling counts against the Oracle processor core factor table. Agree that window with the auditor up front rather than missing a deadline.

Do we have to collect from development and test databases?

If they are in scope under the agreement, yes, and omitting them is worse than including them because Oracle will extrapolate. Note that non production databases normally require full licensing under Oracle's standard terms, so a refreshed test copy carrying production usage history is a real exposure, not a technicality.

White Paper · Oracle Database

Reading the Oracle audit: what the LMS scripts collect.

An Oracle audit is decided by two feature usage views the database has filled in since day one. What the GLAS and LMS scripts collect, and how to read them before Oracle does.

Used across more than five hundred enterprise engagements. Independent. Buyer side. Built for procurement leaders running the next renewal cycle.

Get the white paper →
Opens the white paper landing page. We only email you about this download.
Run the Oracle Java license calculator against your estate in under five minutes.
Open the Tool →

Never let Oracle read your databases before you have read them yourself. The script output is the first draft of the claim, and you should write the second.

Fredrik Filipsson
Co Founder and Group CEO, Redress Compliance
Pass it on

Know someone facing this exact decision?

Send this to whoever owns the renewal, the audit response, or the budget. It takes two clicks and it saves them a quarter of guessing.

Share on LinkedInShare by email