setALLSearchDBsToTruncLog

This will call the procedure setSearchDBsToTruncLog.htm on all remote servers registered on the local system.

        

CREATE PROCEDURE setAllSearchDBsToTruncLog
AS
DECLARE @CMD VARCHAR(255)
DECLARE @CMDstatus int
DECLARE @target VARCHAR(30)
DECLARE @targetId INT

/* set the local transient data stores to trunc. log on chkpt */
EXEC admin.dbo.setSearchDBsToTruncLog

/* set all remote transient data stores to trunc. log on chkpt */
SELECT @targetID = (SELECT MIN(srvid) 
                    FROM master..sysservers
                    WHERE srvid > 0
                    AND srvstatus = 1)
SELECT @target = (SELECT srvname 
                  FROM master..sysservers
                  WHERE srvid = @targetId)
WHILE @targetID IS NOT NULL
  BEGIN
    SELECT @CMD = @target + ".admin.dbo.setSearchDBsToTruncLog"
    EXEC (@CMD)                
    SELECT @targetID = (SELECT MIN(srvid) 
                        FROM master..sysservers
                        WHERE srvid > @targetId
                        AND srvstatus = 1)
    IF @targetId IS NOT NULL
      SELECT @target = (SELECT srvname 
                        FROM master..sysservers
                        WHERE srvid = @targetId)

  END