I want to know how a ticket can be deleted from CA SDM application.
The tickets that we deletes should not reflect in report.
Please help me on this.
Yusuf, there are discussions here why manually delete one ticket is not a good idea and not Supported and I think we all agree with that. With that, if you really want to manually delete one ticket willing to take some risks, I recommend you take a look at itil_arcpur_cfg.xml file in the sdm-root\site\cfg folder. This file gives you all the relations on what you would need to clear its references when you manually delete one ticket. For example, you will see"
<main_obj> <name>call request</name>
<default_query>type = 'R' AND active=0</default_query>
<child> <name>alg.call_req_id</name> </child> <child> <name>cr_wf.cr</name> <extattr ref_attr="id"> <name>attached_sla._mapped_cr_wf</name> </extattr> </child> <child> <name>cr_prp.owning_cr</name> </child>
<child value="persid"> <name>atev.obj_id</name> </child>
<child value="persid"> <name>evtdly.obj_id</name> </child>
<child> <name>lrel_attachments_requests.cr</name> <extattr mark_del="1" ref_attr="attmnt"> <name>attmnt.id</name> </extattr> </child>
<child> <name>lrel_notify_list_cntntf.cr</name> </child>
<child value="persid"> <name>ext_entity_map.ob_persid</name> </child>
<child> <name>attached_sla._mapped_cr</name> </child>
<child> <name>tgt_time.mapped_cr</name> </child>
This tells you beside delete one record from the call request table for a request, you would also need to clear those references in those 10 tables(what we call children). So you can see it is very easy to make some mistakes leave some
hanging or delete some that should not be deleted. Therefore, you should have those backed up before start deleting.
And if you would like to delete that one ticket using SDM archive purge rule, you would need to make sure the ticket is
"inactive"(if not, manually change this field in mdb table active=0), the ticket is old enough(at least 30 days old since closed so you may need to manually change the close_date to fake this), and then use this extra query in the rule
and manually run the rule.
In short, if you want to manually delete one ticket, after properly back up the mdb, you would need to delete records in 11 tables; if you would like to use the archive/purge rule, you may need to fake some fields first and then use some extra query.
Hope this helps. Thanks _Chi
data deletion is strongly unrecommended, as a best pracise I can recommend you specify some flag that will exclude tickets from report (on report level), you can use ootb flags like string1,2,3, etc or publish your own.
But if you really want delete them, you can try to archive and purge (custom flag to mark unwanted tickets could be useful here too): How to Archive and Purge Historical Data - CA Service Management - 14.1 - CA Technologies Documentation
or use pdm_extract: pdm_extract what???? A Crash Course in the pdm_extract command!
It is indeed not recommended and does not fall under best practices at all. The best you can do is to enable the archive purge rules according to your policies in your environment for the limited data as mentioned by Timur.
Here is a technical document for the same: https://support.ca.com/us/knowledge-base-articles.TEC1287591.html
Thanks and Regards,
I agree with both Timur and Maheshwar here. I will add a bit more info and explanation...The reason we do NOT support deleting ticket records is because it leads to what are called "dangling references" in the database, which causes data corruption. This can cause grave problems in the future when upgrading/migrating/patching and can also cause queries to be delayed or incomplete. I strongly suggest you do NOT attempt to delete the record, but rather just close it and inactivate it, then allow it to be purged with normal archive/purge operations.
Thanks for your response...
But want to know while creating purge rule what could be the addition query?
as I mentioned before, better to specify some custom flag and then define it as additional query.
Also if your tickets messed in various statuses and you're familiar with any programming language, you can do 2 things in a single script, using one from this topic: close bulk tickets with comments in CA service desk r12.7. you can change status to Cancelled and specify some attibute like "string1 = 'ARCHIVE'" (uncomment line and modify line 71). Otherwise you can add your attr to Edit in list preset.
It will be impossible for any of us to tell you what to put in the additional query of the purge rule without knowing what is the criteria or condition that qualifies a ticket to be deleted in your environment. We need to know how you determine what tickets need to be deleted in order for us to be able to give you further direction.
Can you provide an explanation of why you want to remove this ticket?
By asking about the additional queries that go into the purge rules, you are obviously attempting to discern what actions go into removing a ticket via the archive/purge process, with the potential idea to perform the activity manually. However, Support CANNOT offer you any assistance in removing the given entries that go into an individual SDM ticket due to the complexities of all the tables involved and the high risk of data corruption in attempting to do so.
Hence my original question: What specifically are you trying to do here, and why do you feel deleting a ticket from SDM is the way to accomplish this task?
If we want to delete data other than last 5 years what will be the additional query ??
I have create a new rule with 1825 defined as days inactive but still its not working..It's not purging any data..
Retrieving data ...