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

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

Break comma separated into multiple rows in MYSQL

mysql global search procedure