Articles Posted in the " Cluster " Category

  • Which Node SQL Cluster was Running

    Which Node SQL Cluster was Running

    While troubleshooting unplanned SQL cluster failover few questions are asked commonly.

    1. When did the last failover occur?
    2. How frequently you failover (planned and unplanned)?
    3. Did this happen recently.

    All these questions can be answered by this query.  You output will depend how frequently you recycle error log and retention of error log.

    You can also use this query to look for other items in your error log.

    
    IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE OBJECT_ID = OBJECT_ID(N'#ERROR') AND TYPE IN (N'U'))
    BEGIN
    CREATE TABLE #ERROR (
    LogDate DATETIME,
    ProcessInfo NVARCHAR(255),
    LogText NVARCHAR(MAX)
    )
    END
    GO
    
    IF NOT EXISTS (SELECT