Skip to main content

Static analysis for PL/SQL and Oracle SQL

ZPA parses database code into structured syntax, then applies checks that understand PL/SQL and Oracle SQL semantics.

Open source · LGPL-3.0 · SonarQube Community Build 26.2+

close_order.sqlzpa-cli 3.2.1 · 5 findings
CREATE OR REPLACE PROCEDURE close_order(p_order_id NUMBER) IS  v_status  VARCHAR2(20);  v_last_id NUMBER;BEGIN  SELECT status INTO v_status FROM orders WHERE id = p_order_id;
  IF v_status = NULL THEN    RETURN;  END IF;
  SELECT id    INTO v_last_id    FROM orders   WHERE ROWNUM <= 1   ORDER BY created_at DESC;
  UPDATE orders SET status = 'CLOSED' WHERE id = p_order_id;END;
  1. Minorline 1ExplicitInParameterExplicitly declare this parameter as IN.
  2. Criticalline 5QueryWithoutExceptionHandlingHandle exceptions of this query.
  3. Blockerline 7ComparisonWithNullFix this comparison or change to "IS NULL".
  4. Criticalline 11QueryWithoutExceptionHandlingHandle exceptions of this query.
  5. Blockerline 14SelectWithRownumAndOrderByMove this ROWNUM comparison to a more external level to guarantee the ordering.

Analyze the code that runs in Oracle

PL/SQL

Anonymous blocks, packages, procedures, functions and declarations are parsed as structured code.

Oracle SQL

SELECT and DML grammar inside database programs is available to rules as named syntax.

Oracle Forms

Object references can be checked when a project supplies Forms metadata. See the metadata format

utPLSQL reports

The SonarQube plugin imports test execution and coverage reports alongside analysis results. Read the integration guide

Choose where to run ZPA

Both use the same analyzer and built-in rules. Choose the integration that fits your workflow.

Standalone CLI

For local analysis and CI jobs.

  • Scans a source directory.
  • Writes console or Sonar Generic Issue Data.
  • Supports JSON configuration and custom rule plugins.
Read the CLI guide