Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2003
    Location
    Belgium
    Posts
    19

    Lightbulb Unanswered: Is it possible to dump database when logdevice is missing ?

    Dear,

    I need to test (experiment) if I can recover from a situation where my logdevice is missing.
    Is this possible ?

    database was created with a seperate data and logdevice.
    I have manually removed logdevice file from os (rm mylogdevicefile), entry still exists in sysdevices tables.

    I would like to make a database dump of only the pages that are on the datadevice. I know that I would loose information from the logdevice, but that is not important.
    In a previous test I had removed the datadevice and then I was still able to make a transaction log dump by using 'dump transaction dbname with no_truncate'. That test was succesfull

    Did some of you do this experiment before ? I will now play around with updating system tables and hope to get it working from here.

    Obviously this is not best dba practice, but sometimes dba's encounter strange problems.

    Best regards,

    babambites

    <ps I'm currently testing this on 12.0.0.14>

  2. #2
    Join Date
    Jun 2003
    Posts
    140
    Dont think u can recover db without log device, post the results here once u go through the test

  3. #3
    Join Date
    Dec 2003
    Location
    Belgium
    Posts
    19
    Hi,

    None of my tests were succesfull.
    I have tried to touch a logfile and afterwards dbcc rebuildlog, it failed.
    I have tried to to delete entry for the log in sysusages + update segmap=7 of datadevice, but it failed as well.

    Luckily this was only a test

    best regards,

    toon

  4. #4
    Join Date
    Nov 2002
    Posts
    207
    Can you pls. post the error messages from your test you got while dumping database w/o logdevice?

    Thanks

  5. #5
    Join Date
    Dec 2003
    Location
    Belgium
    Posts
    19
    Hi,

    I don't have the logfile anymore but what i did was the following

    -> remove of file on unix
    -> restart of database server, database became corrupt

    first test :
    -> touch logdevicefilename (using filesystem not raw device)
    -> update sysdatabase set status=-32768 where dbname="testdb"
    -> restart database server, testdb bypassed in recovery
    -> dbcc rebuild_log (testdb,1,1)
    -> restart
    -> error message -> could locate logical page ...

    pagenumber was first -> select first,root from testdb..sysindexes where id=8 -> this is syslogs
    This error is normal because my file was 0 bytes large

    Then I thought 'f..k', it doesn't work

    second test :
    -> database was in bypass recovery
    -> delete logpart in sysusages + drop device
    delete sysusages where dbid=db_id("testdb") and segmap =4

    sp_dropdevice of logdevice
    -> update sysusages set segmap=7 where dbid=db_id("testdb")
    but I received the same errors as in the first test

    I thought I could update sysindexes table with a value of a non-written page and then restart it again. But this seemed a little bit to tricky..

    thirth test :
    I was out of options and posted this message.

    Best regards,

    Toon Eysakkers

  6. #6
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Without its log, it's not possible to reload a db on ASE.

    But you can recreate a similar database (incl. log) and reload it from a correct db dump (including the syslogs table)

  7. #7
    Join Date
    Dec 2003
    Location
    Belgium
    Posts
    19

    Smile

    Hi fadace,

    That was just what we tried to do in this test. Suppose that you lost your logdevice and no valid backup.

    What can you still do ? The only remaining valid data is on your datadevice.
    I will try if I can still make a database dump and then afterwards recreate the db. I am looking for something like 'dump database mydb with no_truncate" I will post the results after the test

    Remember, this is just a case-test, for our real enviromnents we have a strict backup schedule.

    best regards,
    BabamBites

  8. #8
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Sorry... but I know that you can't

Posting Permissions

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