BSA: cleanupDatabase command fails with "We cannot delete SDepotObject in the range of XXXXXXX to YYYYYYY."

Version 1

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    BladeLogic Server Automation Suite


    BladeLogic Database and Migration


    BMC Server Automation 8.x


    The BMC BladeLogic Server Automation (BSA) blcli Delete cleanupDatabase command runs to completion without error and the following message is observed in the log.

    [Sat Dec 02 09:57:19 GMT 2017] The reference SNSHScriptJob.SJobNshParamRuntime was successfully resolved.[Sat Dec 02 09:57:19 GMT 2017] We cannot delete SDepotObject in the range of 2132856 to 2142524.[Sat Dec 02 09:57:19 GMT 2017] We found entries for the following top-level model references: [Sat Dec 02 09:57:19 GMT 2017] Source SNshParameter[depotObjectId,depotObjectVersionId,nshParameterId] Target SNSHScriptJob.SJobNshParameterValue[depotObjectId,depotObjectVersionId,nshParameterId][Sat Dec 02 09:57:19 GMT 2017] Deleted 0 entries of type SDepotObject

    Subsequently, the   blcli Delete cleanupFileServer command is not reclaiming as much space from the BSA FileServer as expected. 




    Error during batch of object deletion prevents subsequent batches from being processed.


    The blcli Delete cleanupDatabase deletes objects in batches sized per the MaxObjectsPurgedPerTransaction setting in blasadmin.  During deletion of one batch of SDepotObjects (Depot Objects) an error prevents deletion of one or more objects in that batch.  Instead of proceeding to the next batch of SDepotObjects no more batches of SDepotObjects are deleted.

    If the Depot Objects are not deleted by cleanupDatabase then the subsequent cleanupFileServer cleanup will not be able to delete the files associated with the Depot Objects from the file server storage location and this may cause the file server to run out of disk space.

    If this issue is encountered, run the following SQL Query against the BladeLogic database and submit a case to BMC Customer Support with the results.

    select count(*) FROM job_nsh_parameter_value jnpv WHERE exists(select 1 from job, depot_object do where jnpv.job_id = job.job_id and jnpv.job_version_id = job.job_version_id and jnpv.depot_object_id = do.depot_object_id and jnpv.depot_object_version_id = do.depot_object_version_id and do.is_deleted = 1) and not exists (select 1 from job_run jr where jr.job_id = jnpv.job_id and jr.job_version_id = jnpv.job_version_id);



    Article Number:


    Article Type:

    Solutions to a Product Problem

      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles