- Error number
- 2760
- Severity
- 16 (user-correctable error)
- State
- 1
- Product
- Microsoft SQL Server Database Engine
- Versions
- All supported SQL Server versions (2016 to 2025), Azure SQL Database, Azure SQL Managed Instance
- Category
- Syntax & Object Resolution
- Last reviewed
- 24 October 2026
On this page
What it means
Error 2760 means a CREATE statement or SELECT INTO names a schema that SQL Server cannot use: either the schema does not exist in this database, or you are not allowed to create objects in it.
Every new table, view, procedure, function, type or sequence goes into a schema. Before creating it, SQL Server checks that the schema in the name exists and that you hold ALTER on it (or CONTROL, or ownership). If either check fails, it raises 2760 at severity 16 and, in our tests, the rest of the batch did not run. The message deliberately does not say which check failed, so that users without permission cannot discover which schemas exist. The quoted name is the schema, not the object.
The permission case catches people who granted CREATE TABLE or CREATE VIEW and expected that to be enough. Those database permissions only allow the statement; the user also needs ALTER on the target schema. Without the CREATE permission itself, the error is 262 instead. To read objects in a schema, the related errors are 208 (name not found) and 229 (permission denied).
Common causes
- A deployment script creates objects in a schema such as
reportingbefore the CREATE SCHEMA step has run, or in a database where that step was never run. SELECT ... INTOa schema that exists in development but not in the target database.- A typo or a case difference on a case-sensitive database (
Reportingversusreporting). - The user was granted CREATE TABLE, CREATE VIEW or CREATE PROCEDURE but not ALTER on the schema the object goes into.
- The script runs in the wrong database (for example master), where the schema does not exist.
Diagnose it
Read-only These queries only read metadata and dynamic management views. They do not change data, permissions or configuration, so they are safe to run first.
Does the schema exist in this database?
SELECT DB_NAME() AS current_db, s.name AS schema_name, USER_NAME(s.principal_id) AS owner
FROM sys.schemas AS s
WHERE s.name = N'reporting'; No row: the schema is missing (or you are in the wrong database, check current_db). One row: it exists, so the problem is permission.
Can the current user create objects in the schema?
Run this as the user who gets the error (or after EXECUTE AS USER in a test). ALTER on the schema and the CREATE permission for the object type are both needed.
SELECT USER_NAME() AS current_user_name,
HAS_PERMS_BY_NAME(N'reporting', N'SCHEMA', N'ALTER') AS can_alter_schema,
HAS_PERMS_BY_NAME(DB_NAME(), N'DATABASE', N'CREATE VIEW') AS can_create_view,
HAS_PERMS_BY_NAME(DB_NAME(), N'DATABASE', N'CREATE TABLE') AS can_create_table; can_alter_schema = 0 with can_create_view = 1 is the permission trap; NULL for the schema means it does not exist.
List explicit permissions granted on schemas
SELECT SCHEMA_NAME(dp.major_id) AS schema_name,
USER_NAME(dp.grantee_principal_id) AS grantee,
dp.permission_name, dp.state_desc
FROM sys.database_permissions AS dp
WHERE dp.class_desc = N'SCHEMA'
ORDER BY schema_name, grantee; Look for an ALTER (or CONTROL) row for the user or one of its roles on the schema in the message. Members of db_owner and db_ddladmin have it implicitly and do not appear here.
How to fix it
Each fix is labelled with what it changes. Try read-only checks and the least invasive fix first, and test changes outside production.
Create the schema before the objects that use it
Changes schemaCREATE SCHEMA must be the only statement in its batch, so wrap it in dynamic SQL when the script must be safe to rerun.
IF SCHEMA_ID(N'reporting') IS NULL
EXEC (N'CREATE SCHEMA reporting AUTHORIZATION dbo;');
GO
CREATE TABLE reporting.DailySales (sales_date date PRIMARY KEY, total decimal(12,2));
Grant ALTER on the target schema with the CREATE permission
Changes permissionsGrant to a role rather than to individual users, and only on the schema the role should change. ALTER on a schema lets the grantee alter and drop every object in it, so keep application accounts out of this role.
GRANT CREATE VIEW TO report_dev_role;
GRANT ALTER ON SCHEMA::reporting TO report_dev_role;
Use the schema that exists in the target database
Read-onlyIf the schema name was a typo or belongs to another environment, correct the two-part name, and make sure the script runs in the right database.
SELECT DB_NAME() AS current_db;
SELECT name FROM sys.schemas WHERE principal_id < 16384 ORDER BY name;
Examples
A table created in a schema that was never created
CREATE TABLE reporting.DailySales (sales_date DATE PRIMARY KEY, total DECIMAL(12,2));
Msg 2760, Level 16, State 1, Line 1 The specified schema name "reporting" either does not exist or you do not have permission to use it.
Reproduced on SQL Server 2025 (17.0.1145.4), 23 October 2026.
SELECT INTO a staging schema that is missing
SET NOCOUNT ON;
CREATE TABLE dbo.Orders (id INT PRIMARY KEY, total DECIMAL(10,2));
SELECT id, total
INTO staging.OrdersCopy -- staging exists in development only
FROM dbo.Orders;
Msg 2760, Level 16, State 1, Line 4 The specified schema name "staging" either does not exist or you do not have permission to use it.
Reproduced on SQL Server 2025 (17.0.1145.4), 23 October 2026.
CREATE VIEW granted, but no ALTER on the schema
CREATE SCHEMA reporting;
GO
CREATE USER report_dev WITHOUT LOGIN;
GRANT CREATE VIEW TO report_dev; -- no ALTER ON SCHEMA::reporting
GO
EXECUTE AS USER = 'report_dev';
GO
CREATE VIEW reporting.DailyTotals AS SELECT 1 AS total;
GO
REVERT;
Msg 2760, Level 16, State 1, Procedure DailyTotals, Line 1 The specified schema name "reporting" either does not exist or you do not have permission to use it.
Reproduced on SQL Server 2025 (17.0.1145.4), 23 October 2026.
How to prevent it
Make schema creation the first step of every deployment and write it so it can run twice. When a team needs to create objects, grant the CREATE permissions and ALTER on its own schema to a role, so ownership boundaries stay clear and nobody needs db_owner.
Always use two-part names (schema.object) and check the target database at the start of scripts. For the statements involved, see DDL commands and SQL security.
Common questions
I granted CREATE TABLE. Why does the user still get error 2760?
CREATE TABLE only permits the statement. The table is created inside a schema, which needs ALTER on that schema as well. Grant ALTER ON SCHEMA::name to the same user or role.
How can I tell whether the schema is missing or I lack permission?
Query sys.schemas for the name. If a member of db_owner sees no row, it does not exist. If it exists, check HAS_PERMS_BY_NAME for ALTER on the schema as the failing user.
Can CREATE SCHEMA run in the same batch as CREATE TABLE?
Not as separate statements: CREATE SCHEMA must be the first statement in its batch. Put GO after it, or run it through EXEC, then create the objects.
Learn more on CodeWithSQL
Official documentation
- CREATE SCHEMA (Transact-SQL)
- GRANT schema permissions (Transact-SQL)
- CREATE TABLE (Transact-SQL)
- Database Engine events and errors 2000 to 2999
Last technically reviewed 24 October 2026; examples and diagnostics run on SQL Server 2025 (17.0.1145.4). Message text checked against the engine's sys.messages catalogue.