Error map

3726 SQL Server Msg 3726: Could not drop object because it is referenced by a FOREIGN KEY constraint

SQL · layer 5, Data

Open the full error page →

Centre: this error. First ring: errors it is linked with (10). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

3726 — SQL Server Msg 3726: Could not drop object because it is referenced by a FOREIGN KEY constraint (SQL)37262BP01 — ERROR: cannot drop table x because other objects depend on it (PostgreSQL)2BP01547 — SQL Server: The INSERT statement conflicted with the FOREIGN KEY constraint 'x'. (Msg 547) (SQL)547515 — SQL Server Msg 515: Cannot insert the value NULL into column 'X', table 'Y'; column does not allow nulls (SQL)515TRUNCATE — Cannot truncate a table referenced by a FOREIGN KEY constraint (SQL)TRUNCATE5123 — SQL Server Msg 5123: CREATE FILE encountered operating system error 5 (Access is denied) while attempting to open the physical file (SQL)5123209 — SQL Server Msg 209: Ambiguous column name (SQL)209PRAGMA foreign_keys — SQLite foreign keys not enforced: PRAGMA foreign_keys is OFF by default (SQL)PRAGMA foreign_keysforeign key order — Foreign key violation caused by insert order or circular references (SQL)foreign key orderORA-02291 — ORA-02291: integrity constraint (SCHEMA.FK_NAME) violated - parent key not found (SQL)ORA-02291ORA-02292 — ORA-02292: integrity constraint (SCHEMA.FK_NAME) violated - child record found (SQL)ORA-022921146 — MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist (MySQL)114642P01 — PostgreSQL: ERROR: relation "x" does not exist (PostgreSQL)42P0142703 — PostgreSQL: ERROR: column "x" does not exist (PostgreSQL)427031452 — MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails (MySQL)1452SQLite FK failed — sqlite3.IntegrityError: FOREIGN KEY constraint failed (SQL)SQLite FK failed245 — SQL Server: Conversion failed when converting the varchar value 'x' to data type int. (Msg 245) (SQL)2451062 — MySQL ERROR 1062 (23000): Duplicate entry for key (MySQL)106223505 — PostgreSQL: ERROR: duplicate key value violates unique constraint (PostgreSQL)23505Hibernate ConstraintViolationException — org.hibernate.exception.ConstraintViolationException: could not execute statement (Java)Hibernate Constrain…1022 — MySQL ERROR 1022 (23000): Can't write; duplicate key in table (MySQL)10221048 — MySQL ERROR 1048 (23000): Column 'x' cannot be null (MySQL)10481451 — MySQL ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (MySQL)14510x80070005 — Windows Error 0x80070005 (E_ACCESSDENIED): Access is denied (Windows)0x80070005sudoers — user is not in the sudoers file. This incident will be reported. (Linux)sudoersAccessDeniedException — java.nio.file.AccessDeniedException: /path (Java)AccessDeniedExcepti…ambiguous column — Column reference is ambiguous / Column 'id' in field list is ambiguous (MySQL 1052) (SQL)ambiguous column1066 — MySQL ERROR 1066 (42000): Not unique table/alias: 'x' (SQL)1066cartesian — Query returns far too many rows: accidental Cartesian product (missing JOIN condition) (SQL)cartesianreadonly database — sqlite3.OperationalError: attempt to write a readonly database (SQL)readonly databasetransaction — SQLite: cannot start a transaction within a transaction (SQL)transactionE11000 duplicate key — MongoServerError: E11000 duplicate key error collection: db.users index: email_1 dup key (Node.js)E11000 duplicate keyPrisma P2002 — PrismaClientKnownRequestError P2002: Unique constraint failed on the fields: (`email`) (Node.js)Prisma P200223502 — ERROR: null value in column "x" of relation "y" violates not-null constraint (PostgreSQL)2350223503 — ERROR: insert or update on table "x" violates foreign key constraint "fk" — Key (user_id)=(5) is not present in table "users" (PostgreSQL)23503ORA-00001 — ORA-00001: unique constraint (SCHEMA.PK_X) violated (SQL)ORA-00001ORA-00018 — ORA-00018: maximum number of sessions exceeded (SQL)ORA-00018retention — Cloud Storage: Object is subject to the bucket's retention policy and cannot be deleted (Google Cloud / Firebase)retention

Directly related (10)

2BP01PostgreSQL

ERROR: cannot drop table x because other objects depend on it

Views, foreign keys or other objects depend on what you’re dropping.

547SQL

SQL Server: The INSERT statement conflicted with the FOREIGN KEY constraint 'x'. (Msg 547)

The row references a parent that doesn’t exist (or a DELETE would orphan children).

515SQL

SQL Server Msg 515: Cannot insert the value NULL into column 'X', table 'Y'; column does not allow nulls

An INSERT or UPDATE tried to put NULL into a NOT NULL column that has no default.

TRUNCATESQL

Cannot truncate a table referenced by a FOREIGN KEY constraint

TRUNCATE is refused because another table has a foreign key pointing to it.

5123SQL

SQL Server Msg 5123: CREATE FILE encountered operating system error 5 (Access is denied) while attempting to open the physical file

SQL Server's service account can't read or write the .mdf/.ldf file when attaching or restoring.

209SQL

SQL Server Msg 209: Ambiguous column name

A column exists in more than one table of the query and isn't qualified.

PRAGMA foreign_keysSQL

SQLite foreign keys not enforced: PRAGMA foreign_keys is OFF by default

Child rows can reference missing parents, and ON DELETE CASCADE doesn't run, because foreign key enforcement is disabled per conn…

foreign key orderSQL

Foreign key violation caused by insert order or circular references

Rows must be inserted parent-first, and two tables that reference each other need deferred constraints or nullable columns.

ORA-02291SQL

ORA-02291: integrity constraint (SCHEMA.FK_NAME) violated - parent key not found

You inserted/updated a child row whose foreign key value doesn't exist in the parent table.

ORA-02292SQL

ORA-02292: integrity constraint (SCHEMA.FK_NAME) violated - child record found

You tried to delete or change a parent row that still has child rows.

Two steps away (27)

1146MySQL

MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist

The query references a table that MySQL can’t find in that database.

42P01PostgreSQL

PostgreSQL: ERROR: relation "x" does not exist

The table/view isn’t found — missing migration, wrong schema, or a case-sensitive quoted name.

42703PostgreSQL

PostgreSQL: ERROR: column "x" does not exist

PostgreSQL can’t find the column — a missing migration, a case-sensitive quoted name, or a string literal written in double quote…

1452MySQL

MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails

You inserted/updated a row whose foreign key value doesn’t exist in the referenced parent table.

SQLite FK failedSQL

sqlite3.IntegrityError: FOREIGN KEY constraint failed

An insert/update/delete violated a foreign key in SQLite (with PRAGMA foreign_keys=ON).

245SQL

SQL Server: Conversion failed when converting the varchar value 'x' to data type int. (Msg 245)

SQL Server tried to convert text to a number (often implicitly) and hit a non-numeric value.

1062MySQL

MySQL ERROR 1062 (23000): Duplicate entry for key

An INSERT/UPDATE would create a duplicate value in a PRIMARY or UNIQUE key.

23505PostgreSQL

PostgreSQL: ERROR: duplicate key value violates unique constraint

An INSERT/UPDATE would create a duplicate in a UNIQUE or PRIMARY KEY column — or the id sequence is behind the existing data.

Hibernate ConstraintViolationExceptionJava

org.hibernate.exception.ConstraintViolationException: could not execute statement

The database rejected an insert/update because of a constraint (unique, foreign key, not null).

1022MySQL

MySQL ERROR 1022 (23000): Can't write; duplicate key in table

An ALTER/CREATE produced a duplicate key or constraint name — often a foreign key name that already exists in the database.

1048MySQL

MySQL ERROR 1048 (23000): Column 'x' cannot be null

An INSERT/UPDATE put NULL into a NOT NULL column.

1451MySQL

MySQL ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails

You tried to delete/update a row that other rows still reference.

0x80070005Windows

Windows Error 0x80070005 (E_ACCESSDENIED): Access is denied

Windows refused an operation because the account or process lacks permission — seen in Windows Update, installers, Task Scheduler…

sudoersLinux

user is not in the sudoers file. This incident will be reported.

Your account isn’t allowed to use sudo.

AccessDeniedExceptionJava

java.nio.file.AccessDeniedException: /path

The OS denied a file operation to the Java process.

ambiguous columnSQL

Column reference is ambiguous / Column 'id' in field list is ambiguous (MySQL 1052)

A column name exists in more than one joined table, so the database doesn’t know which one you mean.

1066SQL

MySQL ERROR 1066 (42000): Not unique table/alias: 'x'

The same table or alias appears twice in a FROM/JOIN without distinct aliases.

cartesianSQL

Query returns far too many rows: accidental Cartesian product (missing JOIN condition)

Two tables were joined without a condition, so every row of one pairs with every row of the other.

readonly databaseSQL

sqlite3.OperationalError: attempt to write a readonly database

The process can’t write to the SQLite file or its directory.

transactionSQL

SQLite: cannot start a transaction within a transaction

BEGIN was issued while a transaction was already open on the same connection.

E11000 duplicate keyNode.js

MongoServerError: E11000 duplicate key error collection: db.users index: email_1 dup key

An insert/update violated a unique index in MongoDB.

Prisma P2002Node.js

PrismaClientKnownRequestError P2002: Unique constraint failed on the fields: (`email`)

A Prisma create/update violated a unique constraint.

23502PostgreSQL

ERROR: null value in column "x" of relation "y" violates not-null constraint

An INSERT/UPDATE put NULL into a NOT NULL column.

23503PostgreSQL

ERROR: insert or update on table "x" violates foreign key constraint "fk" — Key (user_id)=(5) is not present in table "users"

The row references a parent row that doesn’t exist.

ORA-00001SQL

ORA-00001: unique constraint (SCHEMA.PK_X) violated

An insert/update duplicated a value in a unique or primary key constraint.

ORA-00018SQL

ORA-00018: maximum number of sessions exceeded

The database reached its SESSIONS limit, so no new connection can be created.

retentionGoogle Cloud / Firebase

Cloud Storage: Object is subject to the bucket's retention policy and cannot be deleted

A retention policy or object hold protects the object until its retention period ends.