I am trying to find information about if there are limitations in SQL Server Express to not being able to run the sp_xp_cmdshell_proxy_account and adding a proxy account for the cmdshell command?
Because I'm getting errors while trying to add the credential with the procedure, but I can add it in Server options -> Security. But even when added through server options and I can see that it exists it still executes the CMD commands with the user that is running the SQL Server service.
SQL Server Express version 15.0.2070
Here are some of the errors I have had.
Msg 15137, Level 16, State 1, Procedure sp_xp_cmdshell_proxy_account, Line 1 [Batch Start Line 6]
An error occurred during the execution of sp_xp_cmdshell_proxy_account.
Possible reasons: the provided account was invalid or the ‘##xp_cmdshell_proxy_account##’ credential could not be created. Error code: 5(Access is denied.), Error Status: 0.
When I got that error i followed some tips where you should start SSMS with "Run as Administrator". I still got the same error.
Then I created the Credential with this command.
create credential ##xp_cmdshell_proxy_account## with identity = ‘Domain\DomainUser’, secret = ‘password’
That command works without error, but the cmd executions still are run on the service account not the proxy.
Does anyone have any information if the sp_xp_cmdshell_proxy_account or the proxy account works on SQL Server Express instances or not? And if so, what can I have done wrong?