suspect database

  • how i could find out a databse is suspected via transact sql commands  or system tables in sql server?

  • declare @db sysname

    set @db = 'pubs'

    if (select databaseproperty(@DB, 'isSuspect')) = '1'

     print '   *****  database is SUSPECT.  *****'

    else

     print '   database is not suspect.'

     

    -- Steve

Viewing 2 posts - 1 through 2 (of 2 total)

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