Hey there,
I know, this topic has been discussed sometimes but unfortunately all I have seen are closed and don’t permit be answered anymore.
As the topic says I also need to use an automation to delete duplicate clients on our SEPM embedded database but still haven’t had success.
I turn off the SQLANYs_sem5 and semsrv services, launch the dbsrv16.exe and then access the db with the dbisqlc.exe tool (dba, password, sem5) to modify the db. After that I delete the client in the following, below mentioned tables but without having any real luck.
DELETE FROM PATTERN
WHERE PATTERN_IDX in (SELECT PATTERN_IDX FROM SEM_CLIENT as a INNER JOIN SEM_AGENT as b ON a.COMPUTER_ID = b.COMPUTER_ID where a.COMPUTER_NAME like 'A158CX07-OF03%' AND b.[STATUS] =0)
DELETE FROM SEM_COMPUTER
WHERE COMPUTER_ID in (SELECT a.COMPUTER_ID FROM SEM_CLIENT as a INNER JOIN SEM_AGENT as b ON a.COMPUTER_ID = b.COMPUTER_ID where a.COMPUTER_NAME like 'A158CX07-OF03%' AND b.[STATUS] =0)
DELETE FROM SEM_AGENT
WHERE COMPUTER_ID in (SELECT COMPUTER_ID FROM SEM_CLIENT where COMPUTER_NAME like 'A158CX07-OF03%')
AND [STATUS] =0
DELETE FROM SEM_CLIENT
WHERE COMPUTER_NAME like 'A158CX07-OF03%' AND COMPUTER_ID not in (Select COMPUTER_ID FROM SEM_AGENT where [STATUS] =1)
DELETE FROM V_SEM_COMPUTER
WHERE COMPUTER_NAME like 'A158CX07-OF03%' AND COMPUTER_ID not in (Select COMPUTER_ID FROM SEM_AGENT where [STATUS] =1)
Can someone please give me a hint how to automate it? Because of citrix we are running quite often out of clients :/
Cheers
Stephan