last successful checkdb run and fails if it isn't within

  • Hi Team

    any help and suggestions on this below . Thanks for your valueble suggestions

    USING policy based management.

    CONDITION :-

    "Looks at the last successful checkdb run and fails if it isn't within a certain "

    I need the script for the above condition.

    Question :

    1. For DBCC check db is succfully run or not and it is with in time frame only

    Here i m creating step 1 : Creating Condition

    step 2 : Facet Database selectted

    step 3: Expressions HERE ONLY MY PROB WHAT EXPRESSIONS i have to select here please guide me here only.

    Questions 2:-

    How can i check whathere dbcc checkdb ran any database.

  • This seems to be what you're looking for:

    http://www.sqlservercentral.com/scripts/Administration/62598/

    -- Gianluca Sartori

  • No i m using Policy base mangement here .

  • shiv-356842 (4/6/2012)


    Hi Team

    any help and suggestions on this below . Thanks for your valueble suggestions

    USING policy based management.

    CONDITION :-

    "Looks at the last successful checkdb run and fails if it isn't within a certain "

    I need the script for the above condition.

    Question :

    1. For DBCC check db is succfully run or not and it is with in time frame only

    Here i m creating step 1 : Creating Condition

    step 2 : Facet Database selectted

    step 3: Expressions HERE ONLY MY PROB WHAT EXPRESSIONS i have to select here please guide me here only.

    Create a new Condition, use the Database facet, and for the Field expression you'll use the ExecuteSql function and plug in the SQL Gianluca pointed you towards.

    Questions 2:-

    How can i check whathere dbcc checkdb ran any database.

    Again, look at the SQL Gianluca pointed you towards.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply