Service Desk Practitioners Forum
cancel

delete parent ci

Highlighted
michael roitbur
Respected Contributor.

delete parent ci

hi all,

thank you for all people that anwser my question so fast , i'm make very imprecision for me.

i want to know , when i delete a ci parent, i need to make a rule, for delete the ci children too? i need to delete the relation before? how i can make this?

thank you for a help
9 REPLIES
Oguz Kutlu Asi
Outstanding Contributor.

Re: delete parent ci

Hi,

You can't delete a CI without deleting its relations first. You can use update all feature to set all parents to null of a group of CI.
What's right is right, whether or not God exists
michael roitbur
Respected Contributor.

Re: delete parent ci

this i know , but the question is how i can make this? first i need to delete the relation , after i delete the father , so how now i delete the children?

other question in same subject , if someone delete the children or the parent how i can "delete" the relation?
HPRB
Micro Focus Expert

Re: delete parent ci

Hello Michael,

When you try to delete a CI, a pop-up is shown in the SD that lists all the entities related to the CI, like problem, service call, child CI etc. Here you can make changes to the CI tab's in this entites to point to a different CI, once all the entites are assigned a different CI you should be able to delete this CI.

RB
michael roitbur
Respected Contributor.

Re: delete parent ci

i have service desk 4.5 , in my case when i delete a ci , have a pop-up that tell me what incident are relation with this ci, don't have no alerts about children.

anyway , i want a way, when i delete the father , this automaticly delete the sons and the relation too
HPRB
Micro Focus Expert

Re: delete parent ci

Hi Michael,

The popup shows related CI's to this CI along with entities not the child CI (sorry mentioned it earlier).
When you delete a CI the child CI should get deleted automatically because of th ePk-FK relationship defined in the database. If your database is not broken i.e. not missing this relation then the delete of parent will also delete the childs. Also, any error will be reported in the logserver.txt. Please let me know if you see any error for CI delete. Also, which database are you using for SD application, oracle or sqlserver2000?

RB
michael roitbur
Respected Contributor.

Re: delete parent ci

hi rama:

thank you for your fast anwser.
we working with sql 2000
and here are the error from logserver.txt

× , 30/12/2004 10:21:45 JDBC error 547: [SERVICEDESK]DELETE statement conflicted with
COLUMN REFERENCE constraint 'SVC_COD3_OID_FK'. The conflict occurred in database 'ServicedeskDB',
table 'ITSM_SERVICE_CUSTOM_FIELDS', column 'SVC_COD3_OID'., SQL state: 23000 for query: DELETE itsm_codes
WHERE ((((cod_oid = 281479884898305) AND (cod_lockseq = 98))))

when i check with analyse database , what is this field here are the anwser:


Location B, 3rd custom field of type code field for services. (Reference to Location B, Number 18) itsm_service_custom_fields svc_cod3_oid itsm_codes

the both field are to same this, but i can delete without problems in service desk , but have after problems with the relation
HPRB
Micro Focus Expert

Re: delete parent ci

Hi Micahel,

Which SP for SD45 are you using? Also, did you migrate from sql server 7 to sql server 2000? looks like the delete cascade is not present on some tables.
Run the database configuration wizard with -internal option and choose maintenance option. Check the logdatabase.txt file and check if the database is broken or not.
Which SP version are you using? Did you upgrade recently. check the logdatabase.txt to check for any errors. Let me know.

RB
michael roitbur
Respected Contributor.

Re: delete parent ci

hi:

here are two type of error when i create a relation of children and parent , i pressuming the reason it's becase we delete something.

i need to talk that in the system have this searchcode

SPa = searchcode of parent
SCh = searchcode of child
[EVENT_1632]
VALUE_LIST="username=script#password=12345678#mapping=SnmpC#className=Parent#modus=INSERT#SPa=PS000063#SCh=PS000065#"
SERVER=servicedesk
PORT=30980
SERVER_RESPONSE=ERROR: For ci component the following fields are required: CI Child,CI Parent.
LANGUAGE=GB
TRY=1
LOGFILE=C:\Progra~1\SNMPc\SrvDesk\sd_event_parent.log
ERROR_LOGFILE=C:\Progra~1\SNMPc\SrvDesk\sd_event_error_parent.log
TIMESTAMP= 8/24/2005 15:21:49
SEND=true

[EVENT_1424]
VALUE_LIST="username=script#password=12345678#mapping=SnmpC#className=Parent#modus=INSERT#SPa=MP000902#SCh=MP000914#"
SERVER=servicedesk
PORT=30980
SERVER_RESPONSE=ERROR: For ci component the following fields are required: ci child.
LANGUAGE=GB
TRY=1
LOGFILE=C:\Progra~1\SNMPc\SrvDesk\sd_event_parent.log
ERROR_LOGFILE=C:\Progra~1\SNMPc\SrvDesk\sd_event_error_parent.log
TIMESTAMP= 8/24/2005 14:15:38
SEND=true

thank you
michael roitbur
Respected Contributor.

Re: delete parent ci

non relevant