Service Desk Practitioners Forum
cancel

Possible to remove all CI records?

Highlighted
Jeff Lawrence
Super Contributor.

Possible to remove all CI records?

I want to remove all records from Configuration Items - is there an easy way of completing this task?
3 REPLIES
George M. Meneg
Acclaimed Contributor.

Re: Possible to remove all CI records?

Hello Jeff,

You could do it directly on the db level but I don't suggest it or you are looking for trouble. The safer way is to delete them from service desk, to be sure that there will not be any invalid references to the DB.

However, even deleting them at the db level will not be very fast. Deletions are logged. Truncating the table of config items will be very quick but before doing that you should remove ANY references in other tables.
menes fhtagn
Jeff Lawrence
Super Contributor.

Re: Possible to remove all CI records?

I tried to truncate a table but it wouldnt let me with all the keys associated with each table. I am in the process of manually deleting the data now but with over 100,000 records it will take a while.

Wait, is there a way to turn off history when deleting a record?!
Ganesha Sridhar
Outstanding Contributor.

Re: Possible to remove all CI records?

Hello,

The CIs can be deleted in OVSD using Java code. The java code uses web-api to delete the CI from OVSD.
I have attached the Code which deletes the CI from OVSD. To run this code you please check the example code provided with the OVSD documentation.

The web-api.jar is part of OVSD installation, you can find this in (Service Pages installation) /opt/OV/sd/servicepages/webapps/sd-sp45/WEB-INF/lib
or separately with OVSD installable media.

To Compile the Program:
javac -classpath ;.;d:\eclipse\workspace\lib\servicedesk4.5\web-api.jar DeleteCI.java

To Run the Program:
java -classpath ;.;d:\eclipse\workspace\lib\servicedesk4.5\web-api.jar DeleteCI localhost system servicedesk

Regards
Ganesha Sridhara