Db_stat forcing recovery of environment

We are using the BDB C APIs and have configured the environment for auto-removal of logfiles using the DB_LOG_AUTO_REMOVE flag. Additionally we also partition our databases  by creating new database files at volume intervals. So essentially we have a fixed number of keys in each database physical file.
On running db_stat in the environment for one of our older database files, it forced a database recovery by trying to look into an older log file which it did not find.
*(see below)*
Any ideas as to why this would be happening?
$ ../../db_stat -d db_file_6.db
Fri Dec 17 21:23:45 2010 Local time
db_stat: log.0000000270: log file open failed: No such file or directory
db_stat: PANIC: No such file or directory
db_stat: DB_ENV->log_newfh: 270: DB_RUNRECOVERY: Fatal error, run database recov
ery
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7288
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 8059
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7039
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7778
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 8292
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7529
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 8043
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7023
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 8019
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7256
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7770
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 8284
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7232
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 8003
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7240
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7754
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 8268
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7600
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7094
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7608
db_stat: PANIC: fatal region error detected; run recovery
db_stat: db_file_7.db: write failed for page 7867
db_stat: PANIC: fatal region error detected; run recovery
db_stat: PANIC: fatal region error detected; run recovery
db_stat: close: DB_RUNRECOVERY: Fatal error, run database recovery
db_stat: File handles still open at environment close
db_stat: Open file handle: db_file_6.db
db_stat: Open file handle: db_file_7.db
db_stat: Open file handle: db_file_secondary_7.db
db_stat: PANIC: fatal region error detected; run recovery
db_stat: dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery

I am sorry no one noticed this issue till now.
I would guess that what is happening here is that you are running with a transactional environment and have specified a log directory via set_lg_dir in your application. The environment contains dirty pages from db_file_7.db. When db_stat -d db_file_6.db needs to read a page into the environment it was required to write a dirty page from the environment page cache. This triggered a log write. Since db_stat does not have access to the setting of set_lg_dir it could not find the log file. Specifying set_lg_dir in DB_CONFIG in the environment directory should fix this.
This is speculation based on what you have presented.
Michael Ubell
Oracle Berkeley DB.

Similar Messages

  • Forcing recovery to an earlier version

    I have a number of backups on a system, taken on different days.
    Since these are installation/tests I sometimnes don't want the latest backup but need to go to a prior version.
    However, even renaming the directories, etc does not be sufficient. How can I force XE to pick up the last but one backup?
    Do I have to physically remove all the files from the recovery area. Is there anything else I need to do?
    OS=Windows XE
    DB =XEUniversal

    Do I have to physically remove all the files from the
    recovery area. Is there anything else I need to do? Looks ok to me. Another option would be copying the necessary backup files to another location and use that path in the restore script.
    C.

  • HT4718 How I force recovery to go to Internet recovery as the local doesnt let me reinstall lion

    My computer restarts in recovery mode but doesn't allow me to erase my drive or reinstall lion.
    I don't even see my hd anymore.
    How do I force the Internet recovery and how do I for e rescan to see my drive again.

    What year was your Mac made? If it was before 2010 there is NO internet recovery system for those older Macs.
    And even if it is a 2010 model it has to have the latest firmware installed to use the Internet Recovery system.
    What you have to do on older Macs is use the original install disc that came with your system or a Snow Leopard Retail disc to boot the system and nwipe the drive.
    Then reinstall one of those versions of OS X, Update to 10.6.3 (Retail version of Snow Leopard) then Update that to 10.6.8 from software update then you can reinstall Lion.
    But it sound like you have hard drive problems and if your system is older then a 2010 model more then likely the hard drive is failing and needs to be replaced.
    Next time you get to install Lion create either a Lion Recovery USB stick, useing the Lion Recovery Disk Assistant program downloaded from Apple or use the Lion download, Before you install it, to create a Lion Install USB thumb drive.

  • EP6 disaster recovery environment setup

    I would like to check if anyone on (EP6 SP2 patch 5, Windows 2003 server platform, Oracle database) who may have setup a disaster recovery (DR) environment (obviously in a different location to their production environment). We are also using KM and collaboration.
    We need to create an off-site DR environment for our EP6 solution and need to replicate data to this site every 4-6 hours so that we could recover in the event of a disaster (and not lose more than 6 hours worth of data).
    If you know have experience or know of someone who has done this before,(Windows platform), pls let me know.

    Hi Rajev,
    Duplicating your EP6 installation on a differend server is rather straightforward, so I will not go into that part.  With respect to your Oracle DB, one way of doing this would be to cross-link your log files to the DR server.  Then in case of recovery, you would only need to bring-up the Oracle DB, apply the log files, and then startup your EP6 instance.  Depending on the hardware you're using, your DR environment shoud be able to take over within a matter of 10-15 minutes.

  • I cannot acces the Windows Recovery Environment

    Dear HP experts,
    I bougt an HP Pavilion notebook earlier this year with Windows 8. I must have some malware on it cause it recently started openig random pages in Chrome and other annoying advert stuff.
    Therefore I would like to do a full reset to factory settings through the HP recovery manager.
    When I try accessing it though the function "Windows Recovery Environment" seems to be disabled.
    Also when rebooting the notebook and pressing "escape" it gives the option to excess the recovery environment by pressing F11. However when doing so nothing happens and the notebook just starts normally.
    Can anyone help me to excess the recovery manager environment?
    I would really appreciate any help, thanks.
    Sanne

    Hi @SannedeGoede,
    Welcome to the HP Support Forums!
    I would be happy to help you, but it would be best to get some product specific information, the full product/model number and OS version. Please read the following documents if you need help in finding those.
    How Do I Find My Model Number or Product Number?
    Is the Windows Version on My Computer 32-bit or 64-bit?
    Have you tried to check your computer for malware/spyware/viruses and such first? Depending on what is found it could be something you can fix before doing anything like a system recovery.
    I personally would start with that, and you want to be sure you setup a good program to protect you from this sort of thing in future, or at least make it less likely.
    About Spyware, Adware, and Browser Hijacking Software
    Using Windows 8 Defender to Prevent Virus and Spyware Problems
    After checking for all the "lovely" possible software infections and removing them if possible, then if you are still having trouble I would then look at a system restore, and select a point from before when the problem first appeared. Hopefully you have one available. Often that will fix things, but it is important to screen your computer for those "infections" first, otherwise you will just end up having the same problem
    Using Microsoft System Restore (Windows 8)
    If after trying all of those, then I would look at system recovery. Hopefully you will have resolved it before reaching this.
    Performing an HP System Recovery (Windows 8)
    Troubleshooting HP System Recovery Problems (Windows 8)
    I hope that all of this helps.
    Malygris1
    I work on behalf of HP
    Please click Accept as Solution if you feel my post solved your issue, it will help others find the solution.
    Click Kudos Thumbs Up on the right to say “Thanks” for helping!

  • "iTunes has detected an iPad in recovery mode. You must restore this iPad before it can be used with iTunes."

    Went on a Vegas trip on Sept
    11th.  My iPad worked fine
    before getting on the plane. In the hotel about 48hrs later I opened my iPad it
    read the message: “iPad is disabled,
    connect to iTunes.”
    To my knowledge myself, nor anyone else has tried to access my device or
    entered the password incorrectly 3 or more times.
    I started by updating my iTunes account on my computer to the latest version.
    Then multiple times I attempted
    the “Use recovery mode”
    steps.
    e.g.
    1. Turn off your device and leave it off.
    2. Plug in your device's USB cable to a computer with iTunes.
    3. Hold down the Home button on your device as you connect the USB
    cable. Keep holding down the Home button until you see the Connect to iTunes
    screen.
    I received the message on my computer saying “iTunes has detected an iPad in recovery mode. You must restore this iPad before it can be used with iTunes.”
    I click the “Restore iPad” button.
    During which time the progress bar on my computer’s iTunes
    screen was moving very slowly and other times seemed like it wasn’t moving at
    all. I would leave my two devices and attached by the cable and upon returning
    I would find that the process would have ended before it had completed.
    Initially I thought it was a connections issue because I was in remote
    locations with slow internet servers. Since being home I have re-attempted the
    process and have been able to fully complete the forced recovery but I will
    receive a message saying:
    “The iPad could not be restored. The disk you are attempting to use is full.
    Removing files and emptying the recycle bin will free up additional space.”
    What recycle bin is the message referring to? Obviously I CANNOT access any
    data on the iPad itself. Just for the **** of it, I did empty my computers
    recycle bin and re-attempted the forced recovery process but as I suspected it
    did nothing for the iPad and I still received the same message: “The iPad
    could not be restored. The disk you are attempting to …”
    Please help

    Here's a couple of Apple Support articles ...
    Resolve iOS update and restore errors
    If you can't update or restore your iPhone, iPad, or iPod touch

  • RMAN Automatic backup/recovery with oracle fail safe, windows cluster

    Hello,
    I have question,
    1) Whether it is possible to do "RMAN Automatic Backup and recovery" in environment as ?
    Environment: -
    a. Windows clustering with windows server 2003 Enterprise Edition R2 (Two Node Clustering)
    b. Shared disk ( RAID )
    c. Oracle 10g standard edition one
    d. Oracle fail safe v3.3.3 (for redundancy)
    Here we have single oracle instance operating on single database whose files are located on shared disk.
    2) If answer to above question is yes please specify if there is some good documentation to it.
    Any help regarding this will be greatly appreciated.
    Thanks in advance,
    Rahul

    You just need to make sure that the RMAN scripts are always able to connect to the target database instance whether instance runs on cluster node 1 or cluster node 2
    here, If oracle services(resources) will shift from Node1 to Node2 (due to media or any failure) during RMAN Backup then there will be break in connection, will it destroy my backup or will it get started automatically without any harm?
    and also I want to know,
    Do we need to setup another server which will have RMAN backup script running?

  • Environment configuration for Hot Backups

    Hi all,
    1. I am trying to create a hot backup tool based on the read-only Environment strategy ([discussed in a previous thread|http://forums.oracle.com/forums/message.jspa?messageID=3674008#3674008] ).
    Now, leaving aside the EnvironmentConfig.setReadOnly(true), I have found quite a few possible other configuration options in the EnvironmentParams class and I'm wondering if there are some that I should be using.
    Here are a couple of examples:
    - ENV_RECOVERY
    - ENV_RUN_INCOMPRESSOR
    - ENV_RUN_CHECKPOINTER
    - ENV_RUN_CLEANER
    Would it make sense to configure any of these?
    2. After creating a hot backup I have tried to test its state. Basically, the approach was quite simple:
    - open a read-only env on the backup
    - try to access the databases in the env
    My idea is that if the above 2 ops are succeeding then there is a very good chance that the backup is correct.
    Now, while playing with the above configuration options I have noticed that if I'm setting ENV_RECOVERY to false in this test environment, then any attempt to access the databases within results in a DatabaseNotFoundException.
    Can someone help me understand what is happening? (basically, I cannot make a connection between recovery and access to the DBs in the environment)
    Many thanks in advance,
    ./alex
    PS: I've forgot to mention that I'm running a quite old version: 2.1.30
    Edited by: Alex Popescu on Aug 13, 2009 5:50 AM

    ENV_RECOVERY - suppresses running recovery at Environment creation. Internal parameter.
    ENV_RUN_INCOMPRESSOR, ENV_RUN_CHECKPOINTER, ENV_RUN_CLEANER - disable the INCompressor, Checkpointer, and Cleaner Daemon threads.
    You should not need to adjust any of these parameters for your DbBackup utility. In fact, ENV_RECOVERY is an "internal use only" parameter.
    PS: I've forgot to mention that I'm running a quite old version: 2.1.30
    I'm sorry to be the bearer of bad news, but as my colleague Mark Hayes stressed in a previous post, you really need to upgrade from 2.1.30 to 3.3.latest. It is highly probable that you will eventually run into bugs with 2.x and we are unlikely to (1) be willing to diagnose them, and (2) fix them. As Mark pointed out, 2.1 is 3.5 years old and the product has had a lot of improvements in that time. We are happy to answer questions on this forum relating to the latest major release, but dealing with old and crusty code is certainly going to be well below our allowable priority level.
    Charles Lamb

  • What should i do if my 4s is in recovery mode and won't restore

    what should i do if my 4s is in recovery mode and wont restore

    Hi, dre225. 
    Thank you for visiting Apple Support Communities. 
    If your device is in recovery mode, try processing forced recovery mode. 
    iOS: Unable to update or restore
    http://support.apple.com/kb/HT1808
    If you are receiving an error message, here is the list of the most common error messages and steps to resolve these issues. 
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    http://support.apple.com/kb/TS3694
    Cheers,
    Jason H. 

  • HT201413 what can i correctly configre my i phone 4s recovery mode to restore?

    I wants to configre my i phone 4s recovery mode from restore but isn't correct. Please help me.

    Hi, dre225. 
    Thank you for visiting Apple Support Communities. 
    If your device is in recovery mode, try processing forced recovery mode. 
    iOS: Unable to update or restore
    http://support.apple.com/kb/HT1808
    If you are receiving an error message, here is the list of the most common error messages and steps to resolve these issues. 
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    http://support.apple.com/kb/TS3694
    Cheers,
    Jason H. 

  • 3.1.2 Update Failure. Cannot escape recovery mode

    I attempted to update my 3GS to 3.1.2 today but the installation failed and forced recovery mode (connect to itunes/usb screen).
    I am running windows itunes 9.0.1.8 x64. I have uninstalled the drivers but windows cannot find the two drivers required, "No Driver Found". I have attempted to use the driver C:\Program Files\Common Files\Apple\Mobile Device Support\Drivers\usbaapl64.inf but to no success. It seems to install but returns error "This device cannot start (code 10)".
    I have reset the phone, restarted my computer, reinstalled itunes, cleared reg and more.
    Any help is much appreciated.
    Thanks

    Hey I had this happen and found the fix, though admittedly some people may not be able to use it: I restored it on my other computer with an older version of the firmware. I don't know why but the firmware download seems to be screwing up the restore. Find a friend with an older version and make sure they don't upgrade, then use their PC to restore it. This is a common problem that Apple is denying, took it to the store and they couldn't get it working. IT seems to be very hit or miss, the guy in front of me could get his restored (his was a 3Gs, mine is 3G). I don't know if there is a way to uninstall the update, maybe go digging through your computer under the itunes files for downloads and delete it. Good luck!

  • DB_LOCK_DEADLOCK: Using BerkeleyDB Xml in a threaded environment

    Hello,
    I'm having problems running a Berkeley DB application in a threaded environment. In summary, this is what I'm doing:
    I implemented the following class:
    ref class MyTestClass
    private:
         DbEnv* env;
         XmlManager* man;
         unsigned int ctr;
    public:
         MyTestClass()
              ctr = 0;
              env = new DbEnv(0);
              env->set_cachesize(0, 64*1024, 1);
              env->set_lk_max_lockers(1000);
              env->set_lk_max_locks(1000);
              env->set_lk_max_objects(1000);
              env->open("c:\\temp\\SampleDb",
    DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG |
    DB_INIT_MPOOL | DB_INIT_TXN | DB_THREAD | DB_PRIVATE, 0);
              man = new XmlManager(env, DBXML_ALLOW_AUTO_OPEN);
         void MyTestWriter()
              while(true)
                   DbXml::XmlQueryContext *ctx;
                   DbXml::XmlTransaction *txn;
                   DbXml::XmlResults *res;
                   try
                        ctx = new XmlQueryContext(man->createQueryContext(XmlQueryContext::LiveValues, XmlQueryContext::Lazy));
                        txn = new XmlTransaction(man->createTransaction());
                        res = new XmlResults(man->query(*txn, "for $v in collection('test.dbxml')/sessions return insert nodes <A/> into$v", *ctx, DB_RMW));
                        txn->commit(DB_TXN_SYNC);
                   catch(XmlException& e)
                   finally
                        delete res;
                        delete txn;
                        delete ctx;
         void DeadlockUnblocker()
              while(true)
                   int ret;
                   env->lock_detect(0, DB_LOCK_DEFAULT, &ret);
                   Sleep(5000);
    Basically I create a shared MyTestClass object and then spawn 4 threads: 3 of them execute the MyTestWriter method and 1 executes the DeadlockUnblocker method.
    What happens is that the 3 threads block even before completing the first write. After 5 seconds the DeadlockUnblocker is executed and 1 thread is unblocked and throws a "DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock" which is trapped by my catch block. However, the other threads are still hanging on the execution and the entire flow of the application is stopped.
    Anybody can tell me what I'm doing wrong ??
    Thanks
    Matteo

    Matteo,
    First, the C++ API works best if you avoid new/delete of Xml* objects. There are relatively few cases where that's necessary. Using scoped objects ensures their destruction.
    As for your hang the best tool to use is "db_stat -CA" in the environment directory at the time of the hang to find out what is going on. You'll have to not use DB_PRIVATE in the DbEnv::open() flags for it to work. While a deadlock thread is reasonable if you expect a lot of deadlocks (and concurrent write will do that) it is best to use DbEnv::set_lk_detect() to get immediate detection.
    Regards,
    George

  • An Elephant stepped on my Thinkpad - Rescue and Recovery

    My backup solution for my thinkpad is an external usb drive using Rescue and Recovery which I keep at my place of work. So if I lose my laptop or it gets stolen or an elephant steps on it (at the zoo?), I still have my backup.
    And if the building burns down where the usb drive is stored, I still have my laptop which I always take home every night. I think its a pretty good redundancy solution. The only risk is if I go out for lunch, leaving the thinkpad in the office and the building burns down destroying the laptop and external hard drive together. Its a risk I'm willing to accept.
    Now most backup systems have a "recovery disk" where if your computer stops working or is subject to one of the disasters mentioned above, you can load this disk into another computer, boot into a recovery operating environment and recover your precious files. Thinkpad's Rescue and Recovery system goes one step further where you can have the recovery environment on the usb hard drive itself. All you have to do is plug it in and turn on your computer to boot into the recovery operating system. Great idea!
    Well I thought......and here is my dilemma....
    If my thinkpad is stepped on by an elephant, I would naturally plug my usb drive into my desktop to recover my data files. The problem is, my desktop isn't a Lenovo...so the Rescue and Recovery operating environment doesn't load into memory. It seems to go into this continuous loop of trying to load but fails. Remember I don't want to install Rescue and Recovery onto my desktop, I just want it to load into memory so that I can get access to my back up and transfer my data files to my desktop until such time when I purchase another Thinkpad.
    So my question to this forum is; is it true? is Rescue and Recovery crippled in this way that it only works on Lenovo branded machines, even if your Lenovo has been stepped on by an elephant and you don't have another Lenovo immediately on hand?
    I mean, is the Rescue and Recovery back up solution, just an external hard drive or is it really a external hard drive and another Lenovo computer
    Or is there something (I hope) I have to do in the desktop Bios to be able to get Rescue and Recovery working?
    Just wondering...has anyone done a similar test?   

    Hello,
    Hopefully this email reaches you before an elephant steps on your ThinkPad.
    You might find a white paper I wrote about a year ago of interest:  It's called Options for backing up your computer [PDF, 861KB] and goes over some of the various ways in which home and SOHO users can backup their systems.  It's product and operating system agnostic, so it doesn't get into specific recommendations for tools to use, but does go over the types of backup hardware and software available.  One thing it does not cover is cloud-based solutions, though, so that's something you'll want to look into separately.
    You didn not mention which model of ThinkPad you had, but you might want to look into something like a Pelican Case for yours, if it fits.  While I'm not sure it would be very effective against elephants, it should give you a chance against probably anything smaller than one of the big cats.
    Regards,
    Aryeh Goretsky
    I am a volunteer and neither a Lenovo nor a Microsoft employee. • Dexter is a good dog • Dexter je dobrý pes
    S230u (3347-4HU) • X220 (4286-CTO) • W510 (4318-CTO) • W530 (2441-4R3) • X100e (3508-CTO) • X120e (0596-CTO) • T61p (6459-CTO) • T43p (2678-H7U) • T42 (2378-R4U) • T23 (2648-LU7)
      Deutsche Community   Comunidad en Español Русскоязычное Сообщество

  • I was halfway thru updating ipod touch software, got error 1602

    I was halfway thru updating ipod touch software, i walked away from computer and when i came back there was an error "1602" and a picture on my ipod (requesting to connect to itunes?) but WILL NOT WORK AT ALL!
    What's going on?  Seems like a lot of people are having similar problems all at the same time.

    From the article cited at the end of my post:
    Error 1602: Try the following steps to resolve this error:
    Ensure proper USB isolation troubleshooting has been performed, and test with a known-good cable.
    Follow the steps listed for Error 1604.
    This error may be resolved by disabling, deactivating, or uninstalling third-party security, antivirus, and firewall software. See steps in this article for details on troubleshooting security software.
    Error 1603: If you receive this error and the iOS device is not automatically placed into recovery mode, it may be necessary to do so manually. Refer to iPhone and iPod touch: Unable to restore for steps on placing iPhone into forced recovery mode. Also, remove the IPSW and attempt to restore again. If you do not want to remove the IPSW in the original user, try restoring in a new administrator user.
    Error 1604: This error is often related to USB timing. Try changing USB ports, uninstalling and reinstalling USB ports, and other available USB troubleshooting steps (troubleshooting USB connections, device not recognized properly, computer won't recognize a FireWire or USB device). If you are using a dock, bypass it and connect directly to the USB 30-pin dock-connector cable. If the issue persists on a known-good computer, the device may need service.
    http://support.apple.com/kb/TS1275

  • My iphone will not work unless i plug it into my wall charger. but it is fully charged! When I turn it on (only turns on while plugged into wall) it says it needs to be My iphone will not work unless i plug it into my wall charger. but it is fully charged

    My iPhone will not work unless I plug it into my wall charger, It is fully charged but only works when it is plugged in to wall charger. When it is turned on it say "Restore needed iphone can not make or receive calls' i tried plugging it up to Itunes but it will not turn on to sync.

    First try a hard reset, press and hold the power button and home buttons until the phone restarts and displays the Apple Logo, then let go.
    If that doesn't work...
    Try forcing recovery mode and then restore with iTunes.
    HT1808 iOS: Unable to update or restore
    http://support.apple.com/kb/HT1808

Maybe you are looking for