Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2002
    Posts
    94

    Unanswered: database marked offline while recovery

    Hi,

    Can someone please tell How to recover a database which is marked offline during recovery?

    I got info a situation where we bounce a server and while recovery one of the database reported error as log full and marked offline, what is the work-around to it please?

    Regards,
    Ram.

  2. #2
    Join Date
    Feb 2007
    Location
    India
    Posts
    56

    Re:database marked offline while recovery

    I feel you have to use dump tran dbname with on_log.
    Then it will give some free space you have to increase the log now

  3. #3
    Join Date
    Feb 2007
    Location
    India
    Posts
    56
    not on_log no_log

  4. #4
    Join Date
    Sep 2005
    Posts
    4
    Check this out. Follow the steps exactly that is given in this document and you could solve the problem. We faced this problem once and fixed it using this doc.

    http://www.isug.com/Sybase_FAQ/ASE/s...1.4.html#1.4.2

    Thyagarajan Delli,
    http://dba-diary.blogspot.com
    Last edited by thyagu_delli; 04-19-07 at 11:32.

  5. #5
    Join Date
    Mar 2007
    Posts
    86

    db marked offline?

    well .. if you are using Sybase I can answer for you..

    1. set allow updates to sys tables on
    2. update the sysdatabses.status for the dbid in question to -32768
    3. shutdown server & backup server
    4. restart server and backup server
    -- you are now in no recovery mode for the db with status set to -32768
    5. load the database in question from a dump ..
    6. set sysdatabases.status for that dbid to zero
    7. shut off allow updates to sys tables

    you may have to change status2 from (say 77=offline) to zero ..

    -- or online database <dbname>

    that is if you have a backup

    if not skip the load, and drop the database ..
    - drop database <dbname>
    or
    dbcc dbrepair(dbid,dropdb)

    have fun..

  6. #6
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    This is actually a bug in Sybase. A DBMS should never go into log suspend during recovery. Sybase introduced LCR, a log compensation mechanism in ASE 11.9.2 onwards, but the solution was an half cooked implementation.

    If you are in log suspend, simply alter the database in bypass recovery mode.

    change master..sysdatabases(status) column to -32768
    dbcc dbrepair(<dbid>,remap)
    alter log
    change the status to the 0
    shutdown with nowait, important to shutdown with nowait when any db's are in by-pass recovery otherwise you will inadvertently suicide the log.

Posting Permissions

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