The workaround is to list all the schema that user owns by following script:
SELECT name FROM sys.schemas WHERE principal_id = USER_ID('usertodelete');
then remove or transfer those schema owned by that user to another user, such as dbo by this script:
alter authorization on schema::schema_name to dbo;
No comments:
Post a Comment