Recover_cancel returns 0 although DB not yet shut down

While using a script to "feed" a shadow database with logs, we quite often see, that a recover_cancel is issued, dbmcli returns with 0 but if another log is available and db_admin is executed, it fails with
>db_admin
ERR
-24783,ERR_WRONGDBSTATE: Operational state UNKNOWN
of the database instance is unsuitable.
-24779,ERR_DBSTATENEEDED4: Database instance must be
in one of the operational states OFFLINE, ADMIN, STANDBY or ONLINE.
The script we use looks like
db_admin
db_connect
recover_start logsich log 14327
recover_replace logsich /archivelog/log 14328
recover_replace logsich /archivelog/log 14329
recover_replace logsich /archivelog/log 14330
recover_replace logsich /archivelog/log 14331
recover_replace logsich /archivelog/log 14332
recover_replace logsich /archivelog/log 14333
recover_replace logsich /archivelog/log 14334
recover_replace logsich /archivelog/log 14335
recover_replace logsich /archivelog/log 14336
recover_replace logsich /archivelog/log 14337
recover_cancel
If the script is started a minute later, it works flawlessly.
This behaviour creates quite a lot of false alarms (happens up to 10 times a day).
I know, I could simply add a sleep command, I just want to know, why recover_cancel returns 0 despite the database engine not having released yet the shared memory and is really offline.
Markus

Hi Steffen,
> And here it comes: the kernel waits during this for an answer of the client although there will actually be none because the client 'knows' that the kernel will shut down. Anyway the kernel waits to make sure the communication segment used for message exchanging with the client is not used anymore and can be released. This waiting is limited to 90s. After that time the kernel releases the communication segment and finally shuts down.
>  Anyway it is not assured by the protocol that the kernel is down at the moment the recover_cancel returns and you shouldn't rely on it.
Is this behaviour likewise just when using a recover_cancel or is it also the same when using db_offline?
> With 7.9 the behavior on Unix is changed and the kernel is almost immediately down when the command returns. Up to the release of that release you should indeed wait this 1,5 min until restarting the kernel.
Would it be possible to use dbmcli -s instead? I'll guess, I better put a 'pause' into the script then.
Thank you very much for your time and the analysis.
Markus

Similar Messages

  • My iTunes will not stay shut down. It automatically restarts even without an iPod plugged in. How do I fix this??

    My iTunes, which is the latest version, will not stay shut down. No matter how many times I exit the software, it automatically starts back up. And NO, there are NO iPods plugged in. It's very annoying and is slowing down our desktop immensly. I've tried to find a setting to change it but I'm not a computer/iTunes expert. Can anyone help??

    try holding the home button and off button at the same time for about 10 seconds, it should restart

  • Some times my mac not getting shut down, some times my mac not getting shut down

    some times my mac not getting shut down, some times my mac not getting shut down
    it will show white scree for long time and will not shut down

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, press the key combination shift-command-U. The application is in the folder that opens.
    ☞ If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Console in the page that opens.
    Step 1
    Select "system.log" from the file list. Enter "BOOT_TIME" (without the quotes) in the search box. Note the times of the log messages referring to boot times. Now clear the search box and scroll back in the log to the time of the most recent boot when you had the problem. Post the messages logged during the time when you had the problem – the text, please, not a screenshot. For example, if the problem is a slow startup taking three minutes, post the messages timestamped within three minutes after the boot time. If the problem is a crash or a shutdown hang, post the messages from before the boot time, when the system was about to crash or was failing to shut down.
    Edit out excessive repeats and personal information, if any.
    If the log doesn't go back far enough in time, scroll down in the Console file list to /private/var/log/system.log.0.bz2. Search the archived log, and if necessary the older ones below them, for the same information.
    Step 2
    Do the same with kernel.log.
    Step 3
    Still in Console, look under System Diagnostic Reports for crash or panic logs, and post the most recent one, if any. For privacy’s sake, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if present (it may not be.) Please do not post shutdownStall or hang logs – they're very long and not helpful.

  • MacBook Pro (OS X 10.9.1) calendar continues to "connect to server" and will not allow shut down or restart. Force quit worked. How can I make this calendar "behave"?

    MacBook Pro (OS X 10.9.1) calendar continues to "connect to server" and will not allow shut down or restart. Force quit worked. How can I make this calendar usable? The problem began after I updated to Maverick.

    babowa, it seems like it is using Fuse & NTFS, so I don't think it's the classic WD + 10.9 mess, but extra WD tools & drivers can still break things MtTran.
    MrTran, if you must use unsupported disk formats on your Mac you must also consider actually paying the developers that made the trial software.
    It's probably a good idea to follow the developers removal instructions, reboot & then install one tool at a time.
    MacFuse, FuseOSX, NTFS-3G are all likley to confict if you run older versions so you need to be sure you are using the latest version. I can't remeber which one depends on the other, so you will need to read the manuals.
    When the disk is readable copy the data to another disk. You could probably do this from a Linux distro or Windows if OS X won't do it.
    If you insist on only using the trial versions you will need to reinstall Mac OS, copy data off this disk & reformat it.
    Is there any good reason for not using the Mac HFS extended format?

  • Safari does not allow shut down why.??

    safari does not allow shut down why.? I get a tab that says to quite  safari and i do, but it still does not allow it to shut down why.?

    You can force quit safari if you really want to shut it down.. if the problem remains , try deleting safar and downloading it again

  • Ff 33 does not fully shut down

    My FF v 33.0 stays open in processes under task manager.
    All my other browsers do fully shut down.
    I have reloaded FF on my virus/malware free computer but FF will not completely shut down.
    Very annoying.
    Please help

    Hello,
    Try opening in [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] and see if the browser closes properly after opening in that. Safe mode is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes). Since Firefox has trouble closing, make sure that it is not running in your Task Manager before opening in Safe Mode.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds.''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • Why does notes keep shutting down when I scroll up or down and when I try to add a note?

    Notes keeps shutting down when I try to scroll up or down the list an even if I try to add a new note.

    Please refer to the followibng link for the possible solution.
    http://helpx.adobe.com/creative-cloud/kb/ame-premiere-crash-launch-export.html

  • Database system was not properly shut down

    Dear Mac community,
    I have just repaired a friends 800 MHz 17" Flat Panel Display iMac... Somehow the hard drive had become badly corrupted and the system was frequently shutting itself down and freezing with kernel panics as a result. I managed to recover my friends data using Data Rescue II and after using Disk Warrior managed to do an Erase & Install of Mac OS X (10.4.4).
    The iMac appears to be fine now except for one worrying thing that I have noticed in the console each time after restarting:
    Mac OS X Version 10.4.4 (Build 8G32)
    2006-02-02 16:20:47 +0000
    2006-02-02 16:20:50.962 SystemUIServer[201] lang is:en
    LOG: database system shutdown was interrupted at 2006-02-02 16:19:46 GMT
    LOG: checkpoint record is at 0/87904C
    LOG: redo record is at 0/87904C; undo record is at 0/0; shutdown FALSE
    LOG: next transaction id: 550; next oid: 82855
    LOG: database system was not properly shut down; automatic recovery in progress
    LOG: ReadRecord: record with zero length at 0/87908C
    LOG: redo is not required
    LOG: database system is ready
    Does anyone have an idea what this might be and how I can resolve the issue??
    The systems performance doesn't appear to be affected in anyway however it looks and sounds ominous.
    One other small thing I have noticed is that the iMac won't automatically put itself into sleep mode despite it being set to in the Energy Saver System Preferences. There are no external hardware devices attached such as a printer, firewire device, USB hub etc. I have reset the PRAM and NVRAM and this appears to have had no effect.
    Any advice / suggestions greatly appreciated!!
    Many thanks,
    Justin

    Marking as answered as I managed to resolve the issue

  • To shut down, or not to shut down?

    I read somewhere that it is better not to shut down your MBP at night because it is programmed to do maintenance from 3AM-5AM. Is this true?

    lissermarie,
    There are also other benefits to not shutting down. Being able to build and keep a larger cache of "Inactive" RAM is one of them, leading to much faster application launch times in many cases.
    More importantly, perhaps, is that there is no compelling reason to shut down, over simply putting your computer to sleep. We have had several portable Macs, and none of them have ever actually been shut down (just restarted, mostly when running updates, etc.). In one case that I know of, we had an iBook that had an "uptime" of over 160 days. That's almost 6 months with no shutdown or restart!!!!
    Scott

  • Satellite A100 does not "really" shut down

    Hey everybody!
    I have a Satellite A100 here and the problem is ... yeah, it does not really shut down. I can choose "Shut Down" in Windows and Windows shuts down, the monitor turns black and the notebook does not work anymore, but it does not turn off itself. The blue lights are still glowing. To switch off the system I have to push the on-off-switch for a few seconds.
    The problem occured three days ago. I don't think it's a virus (someone on the net assumed that), because the system has no connection to the internet and has'nt seen any usb-stick or whatever for at least half a year. The user told me he changed the energy-options from "Toshiba Power Saver" to "Desktop". Of course I changed it back, but this did'nt solve the problem. I also did'nt find anything helpful in the options. Anyone out there who knows the problem or knows what to do? :-)
    Greetins,
    coincidence

    Unfortunately, I can't. I choose "Shut down" in safe-mode and the operating system does a simple reboot. The notebook does not turn off at all.
    Thanks so far. :) Merry Christmas!

  • ITunes causes Macbook Pro not to shut down

    Dears,
    For sometime now I am not able to shut down my mbp without holding the power bottom down. I tried so many things, restored lion (performance enhanced but still won't shot down), then i started deleting app thinking it could be the reason until when I deleted iTunes the problem is gone and i am finally able to shut down the machine normally. when i installed iTunes again the problem came back again!!!
    any advice??
    thanks

    my MacBookPro recently started to have problems shutting down too... Its the Core 2 Duo model, and I only have this problem when shutting down from the windoze side...
    I think there may be something to dismounting the network drives though... I unplug a ton of peripherals including an external display, as well as network drives and such...
    I also noticed that the clock started losing its place... Network time has to update it on every startup after switching from OSX to XP and vice versa. Maybe this can clue someone in to a solution... Haven't tried the PRAM zap yet.. I hear OSX doesn't like that too much though- so I'm hesitant.
    15.4" MacBook Pro Core 2 Duo 2.33GHz/OSX-XP via bootcamp   Mac OS X (10.4.8)   3GB Ram/100GB 7200 HD/DVI Cintiq 21UX/BT mighty mouse and BT apple keyboard

  • LabVIEW 2010 SP1 may not cleanly shut down

    Occasionally LabVIEW 2010 SP1 (32-bit, running on Windows 7) will appear to "hang" when the "Getting Started" window is closed.  The window disappears but the shortcut icon still appears in the Windows toolbar in the bottom of the screen.  Right-clicking and selecting "Close Program" does not work and Windows seems to think any VIs that have been recently closed are still open.  The program is still in the list in Task Manager and it can successfully be shut down all the way from there.
    This is more of an annoyance than an operational issue (I think) - is there something I am doing (or failing to do) that causes this problem? 
    Thanks in advance.

    Hello Unplugnow,
    Deleting the .ini file will not cause any issues in terms of being able to reload Labview it will simply restore the default settings for Labview which will insure that there were be no data corruption issues. I have tried this procedure on my side with no issue although I would recommend copying the .ini file to another directory in case you need to recover this information at a later time. 
    To another note, does this issue arise when you are opening a particular VI, or does it occur when you are simply opening and closing Labview?
    Best,
    Blayne Kettlewell

  • To shut down or not to shut down...that is the...

    Hi
    Got an early 2008 MAC Pro...is it best to leave the computer on all week, shutting down maybe over the weekend, or is there harm in shutting everything down every night...got about 2 TB worth of hard drives in it. Does it really matter?
    Thanks
    K

    I leave mine on all the time and put it to sleep when I'm not using it. I've got four 750 GB Seagate drives in my April 2007 Mac Pro. Lots of people have their opinion about thermal stresses on solder joints and mechanical stress on spinning up hard drives but I feel the point is moot. Most of the components become outdated and are replaced long before failure due to these effects.
    My biggest concern is that it generates enough heat to warm up my den in the winter even when I'm doing light web surfing. Although it doesn't cost much to leave the computer on all the time in the summer the heat it generates has to be removed by my air conditioning and since I live in the desert that can cost a bit more to leave it idling which is why I put it to sleep when I'm not using it.

  • ThinkpadYoga does not fully shut down or restart, only display off.

    hello lenovo helpers community
    Everytime I want to shut down or restart my Thinkpad Yoga (11e, running on Win 8.1. Pro), it doesn't fully shut down. The display turns off, but the red LED light remains on and I can hear the vents running.
    No matter how long I wait, it doesn't turn off. I always have to force the shut down with the power button on the side. This is really no solution.
    I have tried a couple of things that are recommended online, but so far, nothing helped.
    Examples of things I tried: power button options, energy options, registry, cmd shutdown -s -f -t 5, scanned virus etc., looked at the autorun list, registry scan (although I didn't really have high hopes on that one), updated all drivers and Win 8.1. Pro, ..
    Please help me, thank you!
    Best, Isa

    hello again
    well, I don't mean to offend anyone, I'm really sorry if I did! The mere fact that you took the time to reply tells me that you care a lot about this. So I will take the time to set this straight, as well.
    I did only have the experience with the German customer service hotline which, too, might be a factor. When living in the States for a couple of years I learned what service was truly all about, coming back here (to Germany) wasn't easy
    Either way, I base my feelings about the German Lenovo CS not on the fact whether or not they could help me, but on how easy it was to reach someone who would try to fix my laptop for more than just five minutes and how fast I was asked to send the laptop in, especially after I told them that that would be the last option (I live in the countryside and getting to the next post office or Lenovo service partner would require at least a 2 hour drive and I don't have a car).
    The M.Windows CS was nice and actually took 2 hours (!!) to figure out what was wrong via remote control, and gave me a couple of numbers to call in the area, that might be able to send someone over. So, although he couldn't help me, I felt like he really tried and took my situation into account. 
    I agree, that the final issue was hard to guess and also that it is weird that error notices were disabled. No one really knows though. Maybe just one with a hickup
    I will not give up on lenovo though, promise

  • Failover cluster not cleanly shutting down service

    I've got a two node 2008 R2 failover cluster.  I have a single service being managed by it that I configured just as a generic service.  The failover works perfectly when the service is stopped, or when one of the machines goes down, and the immediate
    failback I have configured works perfectly in both scenarios as well.
    However, there's an issue when I take the networking down on the preferred owner of the service.  As far as I can tell (this is the first time I've tried failover clustering, so I'm learning), when I take the networking down, the cluster service shuts
    down, and in turn shuts down the service I've told it to manage.  At this point, when the services aren't running, the service fails over to the secondary as intended.  The problem shows up when I turn the networking back on.  The service tries
    and fails to start on the primary (as many times as I've configured it to try), and then eventually gives up and goes back to the secondary.
    The reason for this, examining logs for the service, is that the required port is already in use.  I checked some more, and sure enough, when I take the networking offline the service gets shut down, but the executable is still running.  This is
    repeatable every time.  When I just stop the service, though, the executables go away.  So it's something to do specifically with how the managed service gets shut down *when it's shut down due to the cluster service stopping*.  For some reason
    it's not cleaning up that associated executable.
    Any ideas as to why this is happening and how to fix/work around it would be extremely welcome.  Thank you!

    Try to generate cluster log using closter log /g /copy:<path to a local folder>. You might need to bump up log verbosity using cluster /prop ClusterLogLevel=5 (you can check current level using cluster /prop).
    You also can look at the SCM diagnostic channel in the event viewer. Start eventvwr. Wait for the clock icon on the Application and Services Logs to go away. Once the clock icon is gone select this entry and in the menu check Show Analytic and Debug Logs.
    Now expand to the SCM provider located at
    Application and Services Logs\Microsoft\Service Control Manager Performance Diagnostic Provider\Diagnostic.
    or Microsoft-Windows-Services/Diagnostic
    Enable the log, run repro, disable the log. After that you should see events from the SCM showing you your service state transitions.
    The terminate parameters do not seems to be configurable. I can think of two ways fixing the issue
    - Writing your own cluster resource DLL where you can implement your own policies. THis would be a place to start http://blogs.msdn.com/b/clustering/archive/2010/08/24/10053405.aspx.
    - This option is assuming you cannot change the source code of the service to kill orphaned child processes on startup so you have to clenup using some other means. Create another service and make your service dependent on this new service. This new serice
    must be much faster in responding do the SCM commands. On start of this service you using PSAPI enumirate all processes running on the machine and kill the orphaned child processes. You probably should be able to acheve something similar using GenScript resource
    + VB script that does the cleanup.
    Regards, Vladimir Petter, Microsoft Corporation

Maybe you are looking for