/build/static/layout/Breadcrumb_cap_w.png

Identifying machines that are not part of a replication share

When managing remote environments with the K1000 replication plays a large role in driving down bandwidth requirements and throughput of tasks for the clients.  Because of this emphasis users normally need to identify which machines in their environment do not belong to a replication share.  The SQL code below can be pasted into a SQL report or your favorite reporting tool like MySQL workbench.

/* COMPUTERS NOT PART OF A REPLICATION SHARE */
SELECT NAME, USER, IP, LAST_SYNC,
CASE WHEN DATEDIFF(NOW(), LAST_SYNC) < 5
THEN 'LAST CHECK IN LAST 5 DAYS'
WHEN DATEDIFF(NOW(), LAST_SYNC) < 10
THEN 'LAST CHECK IN < 10 DAYS'
WHEN DATEDIFF(NOW(), LAST_SYNC) < 20
THEN 'LAST CHECK IN < 20 DAYS'
ELSE 'LAST CHECK IN OVER 20 DAYS'
END AS "TIME SINCE LAST SYNC"
from MACHINE
WHERE ID NOT IN
(SELECT MACHINE.ID
FROM MACHINE
INNER JOIN MACHINE_LABEL_JT MLJ ON
MACHINE.ID = MLJ.MACHINE_ID
INNER JOIN LABEL L ON
L.ID = MLJ.LABEL_ID
INNER JOIN REPLICATION_SHARE RS ON
RS.LABEL_ID = MLJ.LABEL_ID AND
ENABLED = 1)
ORDER BY 4 DESC;

Comments

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ