Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

deleating history lines from OVSD database

Highlighted
James Cranley
Acclaimed Contributor

deleating history lines from OVSD database

Hey
There was a problem where there were two DB rules that ended up writing thousands of history lines, and this is causing the client to either take a very long time to open the call or fall over.
So if I can delete the history lines from the DB would this have any other adverse effect on the OVSD platform?

Thanks
james
2 REPLIES
Eng.NM
Member

Re: deleating history lines from OVSD database

hi James

you can define what could be written in the history line through your audit settings, also you can use the archive feature of your SD that can so what you want, just make a proper view for your archive settings (history data) then this will be taken from the SD DB to an XML file, I didnt try it before but I think it will work this way.
hope this could help
thanks
Alexander Kriku
Frequent Visitor

Re: deleating history lines from OVSD database


hi,

you can delete history lines in service call using sql-query like this:

delete from ITSM_HISTORYLINES_SERVICECALL
where HSC_SER_OID in (
select h.HSC_SER_OID
from itsm_servicecalls s,
ITSM_HISTORYLINES_SERVICECALL h
where h.HSC_SER_OID = s.ser_oid
-- id of your servicecall
and s.ser_id = /*servicecall id*/
--date when historyline was created
and hist.HSC_CREATED between /*period*/ )

there should be no adverse effect, but just in case, try this query on a test environment.
also it would be better to make a backup of work environment before running such procedures...
//Add this to "OnDomLoad" event