Friday, May 2, 2025

Msg 15138, Level 16, State 1, Line 7 The database principal owns a schema in the database, and cannot be dropped.

 Msg 15138, Level 16, State 1, Line 7 The database principal owns a schema in the database, and cannot be dropped.



SELECT SCHEMA_NAME, 

    SCHEMA_OWNER

FROM INFORMATION_SCHEMA.schemata

WHERE SCHEMA_OWNER = 'USERNAME';

--mi arreglo--

alter authorization on schema::db_ddladmin TO dbo;

alter authorization on schema::db_owner TO dbo;


posterior a eso puedo borrar y crear el usuario con problema