Hey everyone,
we are looking for a solution to automatically remove Clients from the SEPM Database. The script should delete them from the Database directly and not over the Web-Frontend. So we basically need an SQL-Statement which removed a certain client from the Database without harming it/putting the database in an inkonsistent state.
While searching the Web i found the following statements that should work. Now i need someone (preferably from Symantec) to confirm this or propose a better solution.
--DELETE FROM
-- SEM_COMPUTER
DELETE from [sem5].[sem5].[SEM_COMPUTER]
where [COMPUTER_ID] in (SELECT [COMPUTER_ID]
FROM [sem5].[sem5].[SEM_CLIENT]
WHERE [COMPUTER_NAME] in
(SELECT SEP_Clients FROM SEP_ClientToDelete))
GO
-- SEM_CLIENT
DELETE from [sem5].[sem5].[SEM_CLIENT]
where [COMPUTER_ID] in (SELECT [COMPUTER_ID]
FROM [sem5].[sem5].[SEM_CLIENT]
WHERE [COMPUTER_NAME] in
(SELECT SEP_Clients FROM SEP_ClientToDelete))
GO
-- SEM_AGENT
DELETE from [sem5].[sem5].[SEM_AGENT]
where [COMPUTER_ID] in (SELECT [COMPUTER_ID]
FROM [sem5].[sem5].[SEM_CLIENT]
WHERE [COMPUTER_NAME] in
(SELECT SEP_Clients FROM SEP_ClientToDelete))
Kind regards,
Julien