• Hi Dave,

    One way to accomplish this would be to read the errorlogs to get the last date. This will be the LogDate and the NetBIOS name of the node in the error log when the rollover occurred. Try the below code and see if this may work for you. This can easily be rolled into the DBA Repository, which I will be doing to the next update to the original solution.

    --Read Error Logs

    DECLARE @TSQL NVARCHAR(2000)

    DECLARE @lC INT

    CREATE TABLE #TempLog (

    LogDate DATETIME,

    ProcessInfo NVARCHAR(50),

    [Text] NVARCHAR(MAX))

    CREATE TABLE #logF (

    ArchiveNumber INT,

    LogDate DATETIME,

    LogSize INT

    )

    INSERT INTO #logF

    EXEC sp_enumerrorlogs

    SELECT @lC = MIN(ArchiveNumber) FROM #logF

    WHILE @lC IS NOT NULL

    BEGIN

    INSERT INTO #TempLog

    EXEC sp_readerrorlog @lC

    SELECT @lC = MIN(ArchiveNumber) FROM #logF

    WHERE ArchiveNumber > @lC

    END

    select * from #templog where text like '%netbios%'

    DROP TABLE #TempLog

    DROP TABLE #logF