1.check agent_exe and subsystem_dll’s path in MSDB database

select subsystem_dll,agent_exe from syssubsystems;

2.open xp_cmdshell modular

exec sp_configure 'show advanced options',1;
reconfigure;
exec sp_configure 'xp_cmdshell',1;reconfigure;
test:

exec mater..xp_cmdshell "whoami"

select * from syssubsystems;
update syssubsystems set agent_exe='F:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTExec.exe' where subsystem_id='4'
update syssubsystems set subsystem_dll='F:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\binn\SQLOLAPSS.DLL' where subsystem_id='10'
update syssubsystems set agent_exe = (select subsystem_dll from syssubsystems where subsystem_id = '1')
update syssubsystems set subsystem_dll='F:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\binn\SQLPOWERSHELLSS.DLL',
agent_exe='F:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLPS.exe' where subsystem_id='12'