-
1. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Monoj Padhy Jan 22, 2015 6:34 AM (in response to Ben Vassie)Have you enabled
EnableRetentionPolicy ?
Also what value is set for
RESULTS_RETENTION_TIME. Property dictionary view->job. 0 means do not delete.
A restart would be required after updating above.
Also try executing below command to see what all is expected to clean during this clean process.
select count
(*)from depot_object where is_deleted = '1';
If there is not records returned then you may have set in correct
RESULTS_RETENTION_TIME
records are there to be deleted but script failed to clean up then run the job w/ debug mode enabled and attach log here.
-
2. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Bill RobinsonJan 22, 2015 7:11 AM (in response to Ben Vassie)
select * from delete_tasks;
what's in there? what backend is your db ? are jobs running ok while this is happening ?
-
3. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Ben Vassie Jan 22, 2015 7:22 AM (in response to Ben Vassie)I am now breaking down the cleanup job
blcli -v defaultProfile Delete executeRetentionPolicy now runs fine
However blcli -v defaultProfile Delete cleanupDatabase 6 false 240 is now stuck
[Thu Jan 22 11:23:43 GMT 2015] Executing available patches.
[Thu Jan 22 11:26:39 GMT 2015] Successfully executed available patches.
[Thu Jan 22 11:26:39 GMT 2015] Executing stored procedure: ComplianceResult
[Thu Jan 22 11:26:49 GMT 2015] Finished Executing stored procedure: ComplianceResult
[Thu Jan 22 11:26:49 GMT 2015] Executing stored procedure: SnapshotResult
I started it almost two hours ago
Our databse is Oracle 11g R2, our retention policy is 30 days, all other jobs are running fine
-
4. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Monoj Padhy Jan 22, 2015 7:30 AM (in response to Ben Vassie)so you are running w/ debug mode. Did you see anything in the log ?
-
5. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Bill RobinsonJan 22, 2015 7:30 AM (in response to Ben Vassie)
You should be running the cleanupHistoricalData cleanups before you run cleanupDatabase. Was that done ?
https://docs.bmc.com/docs/display/bsa83/CleaninguptheBMCServerAutomationdatabase
-
6. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Bill RobinsonJan 22, 2015 7:39 AM (in response to Monoj Padhy)
I doubt there is anything wrong. cleanupDatabase will run the stored procs for the various historical cleanups, and if you haven’t been running them regularly and there is a lot of data to delete, then this might take a while. you can see if there are active sessions in the db and probably the update xxx is_deleted = 1 or deletes will be associated w/ the cleanups.
-
7. Re: Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Ben Vassie Jan 22, 2015 7:45 AM (in response to Bill Robinson)CCASCIBBSA01# blcli -v defaultProfile Delete cleanupHistoricalData
[Thu Jan 22 13:45:28 GMT 2015] Executing stored procedure: ComplianceResult
[Thu Jan 22 13:45:29 GMT 2015] Finished Executing stored procedure: ComplianceResult
[Thu Jan 22 13:45:29 GMT 2015] Executing stored procedure: JobSchedule
Command execution failed. java.sql.SQLException: ORA-20202: ORA-06512: at "BLADELOGIC.JOB_SCHEDULE_CLEANUP", line 77
ORA-06512: at "BLADELOGIC.JOB_SCHEDULE_CLEANUP", line 131
ORA-02292: integrity constraint (BLADELOGIC.FK1450_SCHEDULE) violated - child record found
ORA-06512: at line 1
-
8. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Ben Vassie Jan 22, 2015 7:48 AM (in response to Ben Vassie)CCASCIBBSA01# blcli -v defaultProfile Delete cleanupHistoricalData SnapshotResult
[Thu Jan 22 13:47:09 GMT 2015] Executing stored procedure: SnapshotResult
This command hangs
-
9. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Bill RobinsonJan 22, 2015 7:49 AM (in response to Ben Vassie)
Well, if cleanupDatabase is running the same stored proc, it’s not a great idea to try and essentially run the same thing again. though for that error there’s a known fix for it (the FK error in job_schedule)
-
10. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Bill RobinsonJan 22, 2015 7:50 AM (in response to Ben Vassie)
Right…because it’s already running as part of cleanupDatabase?
What db back end do you have ?
-
11. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Ben Vassie Jan 22, 2015 7:51 AM (in response to Bill Robinson)I have not run cleanupDatabase
Oracle 11g R2
-
12. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Bill RobinsonJan 22, 2015 7:56 AM (in response to Ben Vassie)
uh...
blcli -v defaultProfile Delete cleanupDatabase 6 false 240 is now stuck
[Thu Jan 22 11:23:43 GMT 2015] Executing available patches.
[Thu Jan 22 11:26:39 GMT 2015] Successfully executed available patches.
[Thu Jan 22 11:26:39 GMT 2015] Executing stored procedure: ComplianceResult
[Thu Jan 22 11:26:49 GMT 2015] Finished Executing stored procedure: ComplianceResult
[Thu Jan 22 11:26:49 GMT 2015] Executing stored procedure: SnapshotResult
I started it almost two hours ago
? so you have run cleanup database. and it's been 'hung' for 2 hours ... right ?
get and awr and addm covering from when you started cleanupDatabase. see if there are any blocked sessions... if not, i'd just let it go. and then go read the doc i linked to and open a support ticket to fix the fk issue in job_schedule.
-
13. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Ben Vassie Jan 22, 2015 9:14 AM (in response to Bill Robinson)I logged a P2 ticket two days ago, got fed up of waiting, thought the community might be able to help
-
14. Re: executeRetentionPolicy and performFullCleanupJob not doing anything
Bill RobinsonJan 22, 2015 9:25 AM (in response to Ben Vassie)
Ticket # ?