When I execute the following statement in SQL Server 2008 :
use master
go
exec sp_configure 'show advanced options', 1;
go
reconfigure
go
exec sp_configure 'xp_cmdshell',1;
go
reconfigure
go
EXEC XP_CMDSHELL 'whoami'
It gives the following error:
Msg 15121, Level 16, State 21, Procedure xp_cmdshell, Line 1 An error occurred during the execution of xp_cmdshell. A call to 'CreateProcess' failed with error code: '2'.
Please help me with this problem.
Thank you so much.