DBAtlas · Database operations atlas

2714: There is already an object named in the database

SQL Server

What does it mean?

An object with the same name as the one being created (table, view, procedure, etc.) already exists in the database. The CREATE statement failed due to a name conflict.

Why does it happen?

Running the same CREATE script a second time, not dropping the existing object first, a different schema assumption, non-idempotent deployment/migration scripts, or a naming conflict.

How to fix it

Check whether the object exists first: create conditionally with IF OBJECT_ID('dbo.Name') IS NULL, or use CREATE OR ALTER (for procedures/views/functions). If necessary, DROP the existing object and recreate it. Write migration scripts to be idempotent. Verify that you are working in the correct schema/database.

Open in DBAtlas →

More from this engine