Adding or Deleting a Login Fails with xp_cmdshell Error

Saransvan 111 Reputation points
2021-03-24T13:57:26.057+00:00

I have such a weird issue. I have a brand new SQL2019 FCI with CU9 and I can't add or delete logins without having xp_cmdshell enabled. If it isn't I get this error when trying to delete/add/disable etc a login:-

SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', search for 'xp_cmdshell' in SQL Server Books Online.

Why does login admin activity need xp_cmdshell enabled?

SQL Server | Other
{count} votes

Accepted answer
  1. Tom Phillips 17,771 Reputation points
    2021-03-24T17:00:27.36+00:00

    What you describe is almost certainly due to someone creating a DDL trigger which requires xp_cmdshell.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.