The database principal owns a schema in the database, and cannot be dropped. SQL SERVER Error: 15138

The database principal owns a schema in the database, and cannot be dropped. SQL SERVER Error: 15138



SELECT s.name
FROM sys.schemas s
WHERE s.principal_id = USER_ID('YourUserName');



ALTER AUTHORIZATION ON SCHEMA::DB_Owner TO dbo

Comments

Popular posts from this blog

Grouping Sets, With Rollup and With Cube example

Adding Page brake aganist group values

To Get All the Names of tables and Databases their data have changed in last 24 Hours And Backup those databases