I have one up and running job since few years but today i am facing one strange error.
here is error log
Executed as user: ABC\XYZ. Incorrect syntax near '*'. [SQLSTATE 42000] (Error 102). The step failed.
In that step there is no where '*'
here is command in the step
declare @spid varchar(2)
declare @execstat nvarchar(10)
declare kill_cursor cursor
from sysprocesses sp, sysdatabases sdb
Fetch next from kill_cursor into @spid
while (@@fetch_status =0)
set @execstat ='kill'+' '+@spid
exec sp_executesql @execstat
fetch next from kill_cursor into @spid
Please help me how to resolve.