I don’t know if its will help to someone.
But I solve the problem.
and here the explain what to do - all the code is SQL, and should run in the DB:
1.This code will take the the ID and Undeleted him:
exec bfenterprise.dbo.undelete_action <action_ID>
- Query to show all the Deleted action and name ID:
SELECT A.name as 'Action Name', A.ID, A.CreationTime from ACTION_DEFS A, ACTION_FLAGS F WHERE A.ID = F.ActionID AND F.IsDeleted=1
3.Thank to @MattPeterson this code will gives you all the actions who deleted by computer name:
select A.name as "Action Name", A.ID, U.USERNAME, A.CreationTime, C.VALUE as "Computer Name", R.COMPUTERID, STATE, STARTTIME, ENDTIME, TRYCOUNT, RETRYCOUNT, LINENUMBER
from dbo.ACTION_DEFS A, dbo.ACTION_FLAGS F, dbo.ACTIONRESULTS R, dbo.BES_COLUMN_HEADINGS C, dbo.USERINFO U
where (A.ID = R.ACTIONID and A.ID = F.ACTIONID AND C.NAME = 'Computer Name' and C.VALUE LIKE 'ENTER_PCNAME_HERE%' and c.COMPUTERID = R.COMPUTERID and U.MASTHEADUSERNAME = A.USERNAME)
- this code pull the result of the code (DB) above and push him back to Console
DECLARE @MyCursor CURSOR;
DECLARE @ID INT;
BEGIN
SET @MyCursor = CURSOR FOR
SELECT A.ID
from dbo.ACTION_DEFS A, dbo.ACTION_FLAGS F, dbo.ACTIONRESULTS R, dbo.BES_COLUMN_HEADINGS C, dbo.USERINFO U
where (A.ID = R.ACTIONID and A.ID = F.ACTIONID AND C.NAME = 'Computer Name' and C.VALUE LIKE 'pcname%' and c.COMPUTERID = R.COMPUTERID and U.MASTHEADUSERNAME = A.USERNAME)
OPEN @MyCursor
FETCH NEXT FROM @MyCursor
INTO @ID
WHILE @@FETCH_STATUS = 0
BEGIN
exec bfenterprise.dbo.undelete_action @ID
FETCH NEXT FROM @MyCursor
INTO @ID
END;
CLOSE @MyCursor ;
DEALLOCATE @MyCursor;
END;
- And that it! you can delete any actions you want and don’t be, and be sure if you want to investigation some station - you can reverse it!