Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2008
    Posts
    19

    Unanswered: Suspect Database

    Due to Power Failure, my Database has gone into suspect mode
    How could i take the Database live ?

    sory for spelling mistake in subject

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by sagitarius
    Due to Power Failure, my Database has gone into suspect mode
    How could i take the Database live ?

    sory for spelling mistake in subject
    If you are lucky, it may just take a clean restart of the database (and/or the operating system).

    If you are not lucky, you will need to restore from last known good backup.

    In either case, once the database is back on line, you will want to perform a DBCC CHECKDB.

    Regards,

    hmscott
    Last edited by hmscott; 01-22-09 at 22:37.
    Have you hugged your backup today?

  3. #3
    Join Date
    Dec 2008
    Posts
    19
    i have tried the following scripts , but it returned me lot of errors


    EXEC sp_resetstatus 'DBname';

    ALTER DATABASE DBname SET EMERGENCY

    DBCC checkdb('DBname')

    ALTER DATABASE DBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE

    DBCC CheckDB ('DBname', REPAIR_ALLOW_DATA_LOSS)

    ALTER DATABASE DBname SET MULTI_USER

  4. #4
    Join Date
    Aug 2008
    Location
    India
    Posts
    55
    Is it a PROD box ? do u have lot of users in that , If not detach the database using enterprise manager and attach it again using mdf and ldf file. I have asked if there are many users in that DB since permissions may get lost while performing detach and attach.Please cross check all the login permission after doing so.

    Note : While detaching you may get an error u proceed further . Refresh it . Database would have been detached

  5. #5
    Join Date
    Jun 2007
    Location
    Ohio, USA
    Posts
    142
    Just remember when you run repair_allow_data_loss, you are accepting the loss of data, whatever it may be. Are you really sure you want to do that?

    Detaching the DB while it is suspect will only prevent you from re-attaching it. Then you will DEFINITELY be restoring from backup.

    hmscott had the best advice so far. If you can restart the machine and the DB comes up fine, run a DBCC CHECKDB WITH NO_INFOMSGS, ALL_ERRORMSGS on it. If it doesn't come up fine, then you'll have to restore from backup.

    It would also be helpful if you would tell us what version of SQL Server, and provide the exact error messages you are receiving.
    David Maxwell
    Data Integrity? Yeah, I've heard of that...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •