The server principal owns one or more server role(s) and cannot be dropped.
Read the error message.
The login owns server roles. Change the role(s) owner to a different login before you can drop the login.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Error :
Msg 15141, Level 16, State 1, Line 1
The server principal owns one or more server role(s) and cannot be dropped.
Note: I don't have always on or any mirroring endpoints, the server is simple and standalone.
is there any way to drop the login.
The server principal owns one or more server role(s) and cannot be dropped.
Read the error message.
The login owns server roles. Change the role(s) owner to a different login before you can drop the login.
Hello,
It does not have any roles
HI @Anonymous ,
You can use the following code to check the server role, if you use Windows Groups for this login
select @@SERVERNAME
,sl.name
,isnull(DB_Roles.Roles,'Public')
from syslogins sl
left join
(
select 'sysadmin' as Roles
union all
select 'securityadmin'
union all
select 'serveradmin'
union all
select 'setupadmin'
union all
select 'processadmin'
union all
select 'diskadmin'
union all
select 'dbcreator'
union all
select 'bulkadmin'
union all
select 'No serverRole'
union all
select 'public'
) DB_Roles
on
Case When sl.sysadmin=1 and DB_Roles.Roles='sysadmin' then 'sysadmin'
When sl.securityadmin=1 and DB_Roles.Roles='securityadmin' then 'securityadmin'
When sl.serveradmin=1 and DB_Roles.Roles='serveradmin' then 'serveradmin'
When sl.setupadmin=1 and DB_Roles.Roles='setupadmin' then 'setupadmin'
When sl.processadmin=1 and DB_Roles.Roles='processadmin' then 'processadmin'
When sl.diskadmin=1 and DB_Roles.Roles='diskadmin' then 'diskadmin'
When sl.dbcreator=1 and DB_Roles.Roles='dbcreator' then 'dbcreator'
When sl.bulkadmin=1 and DB_Roles.Roles='bulkadmin' then 'bulkadmin'
else null end=DB_Roles.Roles
order by 2
-------------
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
It does not have any roles
You misunderstood; the login owns (!) a server role.