# ORA-06512: at "SCHEMA.PROC", line N

**Code:** `ORA-06512` · **Category:** SQL · **Seen on:** SQL

A stack-trace line from PL/SQL — the real error is the ORA- code above it.

## Meaning

ORA-06512 never appears alone; it tells you where in PL/SQL the preceding error (e.g. ORA-01403, ORA-06502) was raised.

## Common causes

- Underlying PL/SQL error (no data found, value error)
- Unhandled exception in a procedure/trigger

## Quick fix

1. Read the first ORA- error in the stack
2. Add exception handling for expected cases (NO_DATA_FOUND)

## Detailed fix by platform

### SQL

1. `EXCEPTION WHEN NO_DATA_FOUND THEN v_total := 0;`

## How to diagnose

1. **First error** — Which ORA- code precedes it?
2. **Line** — Which statement?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/sql/ora-06512-at-line)
