(imported topic written by bobk91)
Recently we ran BESDeletedCompRemover.exe on BFEnterprise, after a long period of not running it. We currently run BESExpiredComputerRemover twice a day with a 30-day period, with no issues. So BESDeletedCompRemover.exe was then run once, but it looks like it terminated or was terminated for some reason. For that first run it deleted a large number of rows from the actionresults and questionresults tables, but it wasn’t able to complete (or it was killed by someone externally). So we ran it again the next day, and it then did the fixletresults tables, but afterwards the number of rows in COMPUTERS with IsDeleted=1 still seems abnormally high, roughly the same as it was before we ran it the first time.
-
Should the rows with IsDeleted=1 in COMPUTERS also have been deleted by the second run?
-
Assuming yes, then could the fact that it got aborted the first time somehow be the cause of this?
run log-----------------------------------------------------
START: BESDeletedCompRemover_6_0 v.1_1_6_0 started at: Wed Aug 29 08:51:20 2007
BES Computer Removal From Database started
There are 87605 computers that may be deleted. Do you want to remove them from the database? (Yes/No) Deleting action results… this may take a while…
Deleted 5684042 action results records.
Deleting question results… this may take a while…
Deleted 15647725 question results records.
Deleting fixlet results… this may take a while…
START: BESDeletedCompRemover_6_0 v.1_1_6_0 started at: Thu Aug 30 02:00:05 2007
BES Computer Removal From Database started
There are 87645 computers that may be deleted. Do you want to remove them from the database? (Yes/No) Deleting action results… this may take a while…
Deleted 27859 action results records.
Deleting question results… this may take a while…
Deleted 52799 question results records.
Deleting fixlet results… this may take a while…
Deleted 32849970 fixlet results records.
Computer removal completed. A total of 32930628 result rows were deleted from the database.
END: BESDeletedCompRemover_6_0 completed at: Thu Aug 30 02:28:05 2007
check
select count(*) from QUESTIONRESULTS where ComputerID in (select ComputerID from COMPUTERS where (ISDeleted=1))
select count(*) from ACTIONRESULTS where ComputerID in (select ComputerID from COMPUTERS where (ISDeleted=1))
select count(*) from FIXLETRESULTS where ComputerID in (select ComputerID from COMPUTERS where (ISDeleted=1))
select count(*) from COMPUTERS where (ISDeleted=1)
58321 (ok)
31519 (ok)
144610 (ok)
109169 (not ok or we are missing something)