SD Error Code: 1012 "Object has been removed from the database"

book

Article ID: 127836

calendar_today

Updated On:

Products

CA Automation Suite for Data Centers - Configuration Automation CA Client Automation - Asset Management CA Client Automation - IT Client Manager CA Client Automation CA Client Automation - Remote Control CA Client Automation - Asset Intelligence CA Client Automation - Desktop Migration Manager CA Client Automation - Patch Manager

Issue/Introduction

When attempting to get the Software Catalog, an  error appears:  SD Error Code: 1012  "Object has been removed from the database" 
This occurs when a software package is based on an existing package

Cause

A software package is linked to another software package within Catalog

Environment

Release:
Component: DTSVMG

Resolution

By removing the linking of the two packages, the packages will be shown in Catalog
  1. Enable detail trace in the logs by:
    cftrace -c set -l DETAIL -s 50000 -ln 5 -f USD -pp APIServer
  2. Reproduce the issue, then view the APIServer log file
  3. Locate the "1012" error, it show be similar to:
    |ERROR | API return code set to: 001012 (SDAPI_OBJECT_MISSING)
  4. A few lines right above it show appear as such:
    |NOTIFY | ##EXCEPTION## VersionError T
    |NOTIFY | ##EXCEPTION## VersionError(missing): Table usd_rsw, ObjectId 835AA6D8-XXXX-XXXX-XXXX-0ED3E46095C3, Comment: read: usd_rsw. 
    |NOTIFY | ##EXCEPTION## VersionError C
  5. A few lines above that you should see the following debug sql query:
    DETAIL | ExecuteCommandPointer sqlwparam: select objectid,version,creation_user,packagesize,packagetype,itemname,itemversion,itemtype,sourcemedium,productname,productversion,filedby,supplier,"comment",creationdate,creationtime,changedate,changetime,reportevents,activationproc,recnotification,singlemediasourcepath,singlemediasourcepathentered,basedon,deliverproc,undeliverproc,archtime,addsize,archpath,archby,archcomment,archflag,flags,crc32,software_def from usd_rsw WITH (NOLOCK) where objectid = 0xd8a65a83f89d95478b840ed3e46095c3
  6. Note the ObjectId at the end; copy that to your clipboard
  7. Connect to the MDG Database and run:
    Select * from t_usd_rsw where basedon = (the copied value) 
    --ex: 0xd8a65a83f89d95478b840ed3e46095c3
  8. If there are NO results, skip the rest of the steps and contact Customer Support
  9. The results confirm that the packages are linked / based off each other.
  10. Now, from the Domain Manager, run 
    caf stop
  11. Connect to the MDB Database
  12. Backup the database before continuing
  13. Execute the following query:
    -- Reset just the affected package
    
    use mdb 
    update usd_rsw 
    set basedon=0x00000000000000000000000000000000 
    where basedon=(copied value) and basedon not in (select objectid from usd_rsw)
    
    OR
    
    -- Reset all basedon
    use mdb 
    update usd_rsw 
    set basedon=0x00000000000000000000000000000000 
    where basedon<>0x00000000000000000000000000000000 and basedon not in (select objectid from usd_rsw)
  14. Again, from the Domain Manager, run 
    caf start
    
  15. Your catalog should be working now