Sudden shutdown- then strange battery behavior?

About a week ago I was using my 2009 Macbook before I went to take an exam. When I left it had very little battery left (it has given me a warning) but I just shut the top and left, figuring it would go into Safe-Sleep. When I came back, I found that the fan was running very loudly and that the screen was dark. When I plugged in my MagSafe charger, it didn't recognize that it had been plugged in. In an attempt to prevent the fan from burning out, I took the battery out for awhile and then put it back in again... and the fan began to run again. I figured I would let it run for a little while and eventually the fan turned off and a while after that the computer turned on.
Ever since, I've been getting strange readings about my battery from the built-in indicator and my iStat Pro widget. When it's not plugged in, the built-in reader doesn't tell me how much battery is left, but instead lags and then tells me that it is plugged in and "Not Charging"
Right now iStat Pro is telling me that my battery is 29% charged when not plugged in but when I plug it in it tells me that I have 10 hours of charging remaining until I reach 100%.
I'll have this laptop for a year next week, it seems a little early for battery problems of this scale. I swear I haven't dropped it! Anyone have any ideas before I bring it in?

My iBook seems to take a long time (15 minutes) to calculate the battery charge.
A note on the lower right-hand of this page:
<http://www.apple.com/batteries/notebooks.html>
says 300 cycles is the battery design life.

Similar Messages

  • Suddenly shutdown when the battery is lower than 6%

    suddenly shutdown when the battery is lower than 6% (sometimes lower than 10%)and can not power on anymore, you need to plug the AC to trigger to power on the phone.

    Your battery gauge needs to be recalibrated. When the phone goes off, charge for just a couple of minutes, then run the battery down all the way. If it shuts off above 1% charge again for a couple of minutes, then run down again. Repeat until it actually goes off at 1%. Then charge for 4 hours with the wall charger without using the phone.
    To prevent this happening again, about once a month run the battery all the way down until the phone shuts off, then charge to 100% with a wall charger. (This is actually recommended in Apple's iPhone tips, but they don't say why to do it. The "why" is to recalibrate the battery gauge.)

  • Strange battery behavior

    i haven't used my nano in 2 months. i am going on a trip and i wanna bring the nano... so i plug it in.
    i get a large battery icon in the middle of the screen. it is an empty battery with a lightning bolt on the left side.
    like the one at the bottom of this page...
    http://docs.info.apple.com/article.html?artnum=60970
    i got the nano for christmas of this past year... 2005. the battery can't be out of re-charges already.
    Windows recognizes the nano... is shows up in 'my computer'... but itunes does not see it. it has been connected for 2 hours now... and the screen shows a do not disconnect icon.. and then up in the right corner there is a small battery icon that keeps going from empty to full over and over. there is also a small 'refresh' icon in the upper left corner... an up arrow and down arrow spinning around to make a circle.
    can someone tell me what is going on?
    thanks
    jer
    nano 4gig Windows XP Pro

    Run it until it goes totally dead in which case the machine turns off. This does not mean to go into sleep or hibernate. Thats not dead!!
    You either have to configure power manger to not do anything in case of weak battery or boot into something else where there is no power management EG CD tool or something.
    The fully charge it and see what its says for its level. Once charged you can go into the TVT Powermanager and look at the state of the battery and also confirm/test it further.
    T520 Model 4239 Intel(R) Core(TM) i7-2860QM CPU @ 2.50GHz
    Intel Sandy Bridge & Nvidia NVS 4200M graphics Intel N 6300 Wi-Fi adapter
    Windows 7 Home Prem - 64bit w/8GB DDR3

  • GS60 Pro - Erratic battery behavior

    My GS60 Ghost Pro has a strange battery behavior since I got it earlier this week.
    As an example, I did a powercfg -batteryreport and got something like this:
    16:23:34   Active    AC    98 %    53,291 mWh
    16:32:36   Active    Battery    98 %    53,280 mWh
    16:34:44   Active    AC    98 %    53,280 mWh
    17:05:58   Active    Battery    98 %    53,280 mWh
    17:06:04   Active    AC    98 %    53,280 mWh
    17:09:11   Active    Battery    98 %    53,280 mWh
    17:09:17   Active    AC    98 %    53,280 mWh
    17:18:27   Active    Battery    98 %    53,280 mWh
    17:18:33   Active    AC    98 %    53,280 mWh
    As you can see, it switches between AC and Battery by itself while being plugged in. It happens randomly. Other times charge goes to -1 mWh:
    20:52:40   Active    AC    100 %    53,860 mWh
    21:19:44   Active    Battery    -   -1 mWh
    21:19:47   Active    AC    100 %    53,860 mWh
    21:34:49   Active    Battery    -   -1 mWh
    21:34:52   Active    AC    100 %    53,860 mWh
    I have also managed to get a "Battery not detected" message while the laptop was not even plugged. Powercfg reported:
     Installed batteries
    Information about each currently installed battery
    No batteries are currently installed
    Again, the laptop was running from the battery when getting this message.
    I have tried to do an EC reset and to run the MSI battery calibration tool, but this has not fixed the issue.
    Is there anything else I can try? Or is the battery defective and I should contact MSI already?

    No, it`s really simple, hold your finger on an icon for a few seconds before they start to wriggle, and hit Delete, or "X" i`m not sure.

  • Ultrabay battery won't switch to main battery and results in sudden shutdown.

    Hi,
    I just changed my windows 7 32 bit to 64 but version. The power manager version is 3.66 and driver version 1.64, bios version is    LENOVO 7UET93WW (3.23 , 12/15/2011). The ultrabay battery drains to zero and won't switch to main battery, which leads to a sudden shutdown without any warning. In windows 7 32 bit version, I don't have such problem. It's annoying. My computer is T400 7147 CTO. 
    Thanks!
    chicagot400

    Hi I have the exact same problem. I have a T400 2764 CTO. Changes I have recently made (past 2 weeks): I upgraded to Windows 7 64, added a PC Card media reader, added an express card USB 3.0, a Samsung 256 GB SSD and the Ultra Bay Battery. Everything was working great... both batteries recognized, ran Lenovo Update... Have everything...
    Well the battery meter recognizes both batteries (a 4-cell and a 3-cell), combines their life, but it drains the 3-cell first to ZERO... and isn't bright enough to figure out how to switch before abruptly dropping power to the system.
    Hopefully like the ATI switchable graphics that had bugs for ages this battery issue eventually gets fixed. Let me know if you figure out any solution. AND LENOVO, if you are reading, try and set it up so that the 2 battery usage maximizes the life of both batteries with whatever controller you put together.
    Thanks.
     - Tom

  • My iphone is switched off suddenly n then it wont b started it continously shows the apple logo then again switched off automatically and when i charge it so it was switched on and after a long time then it shows battery low and then its also show 4% batt

    my iphone is switched off suddenly n then it wont b started it continously shows the apple logo then again switched off automatically and when i charge it so it was switched on and after a long time then it shows battery low and then its also show 4% battery what would i do im very tensed please help ...

    Hello s0ha1b
    If all you get is the Apple logo and it powering off, then the next step is to put your iPhone into recovery mode and then use iTunes to restore it. If you have a back up, then you can put that on there to once the restore is complete.
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808
    Regards,
    -Norm G.

  • T23 Battery not charging, strange battery/charger behavior

    I have an old T23. Two months ago it suddenly stopped charging the battery. It seems as an IC problem. Therefore, I decided to buy an external battery charger (ThinkPad Multiple Battery Charger II, P/N: 22P9040), and a new battery, since the old one could drive the T23 for less than, say, 15 minutes.
    After receiving the charger and a new battery (from two different suppliers in USA), I found a strange problem: the old battery is charging normally, but operates for 15 minutes, or less, and the new one is not charging - the orange light flashes permanently.
    After that, I decided to buy another new battery, this time from Hong Kong, but the whole story repeated.
    Any suggestions? Thanks in advance.

    Re-solder the coils:
    http://translate.google.de/translate?sl=de&tl=en&js=n&prev=_t&hl=de&ie=UTF-8&layout=2&eotf=1&u=http%...
    My home-forum: http://www.thinkpad-forum.de
    Wiki: Deutsches ThinkPad-Wiki English ThinkWiki
    My ThinkPad-Collection

  • Sudden shutdown when working on battery mode, clock reset

    Hi
    i am running windows 7 32 bit on an HP dv6970ej (dv6000) and my problem is sudden power failures when working on battery.
    my first battery was worn out a few months ago and so I replaced it (with an HP original). it worked fine for a while but lately when I am working on battery mode the system shuts down with no warning.
    the thing is that when I plug it back to the AC the battery is almost full - 85%-90% charged.
    also - the last few times the power went down the clock was reset. i replaced the BIOS little battery but that didn't seem to make much difference. 
    i also tried to update the BIOS, didn't change anything.
    the main issue of course is the system shutting down unexpectedly, while the battery is obviously still holding charge.
    any suggestions?

    the clock reset is just a side effect of the main issue - system power failure. as long as there are no sudden shutdowns the clock is saved. plus i guess i am not gonna replace the whole motherboard so that's why i am less concerned about that.
    what really bugs me is not having the ability to disconnect the computer from the AC for more that a few minutes. sometimes it shuts down after two minutes, sometimes after 10-15 min.
    i am thinking- maybe it has anything to do with voltage drops or something like that or incorrect reading of the battery, because as i said - when i plug it back in - in indicates 80%-90% charge level.
    I also ran a diagnostic on the battery's wear level. the old battery was definitely worn out, but the current one seems to be OK on that aspect.

  • Sudden shutdown of MBP while on battery power

    I have started experiencing sudden shutdowns after being on battery power for 15 minutes. So far this has occurred while using Safari and Photoshop CS3. When I have checked the system log file, it has indicated "Previous shutdown cause: -103"
    I have searched the web for this code and not found it yet - does anyone have an idea as to what this could refer to or what the issue might me? this is a 2008 MBP (purchased in August, 2008)

    Those figures actually look fine, ze red baron.
    At a maximum capacity of 5315mAh it is still at around 95% of original maximum capacity. Very different from what I expected when I wrote my earlier post!
    It is possible that the figures are somewhat misleading if you haven't calibrated it in recent times, though. See http://support.apple.com/kb/HT1490 for the process.
    You should also reset the SMC - see http://support.apple.com/kb/HT3964.
    Remove and replace the battery, too.
    I am wondering, though, if the battery is as good as the figures currently indicate, whether something else may be involved here. Has it ONLY shut down when using the programs you refer to, or is happening generally, regardless of what is running?
    Cheers
    Rod

  • Random, Sudden Shutdowns - A redux and other things to rule out first

    Do a google search for "macbook random shutdown" and you'll find many people with similar problems reporting on various forums. At present, this issue has not been picked up by the mainstream PC news media. However, one should also note that only a fraction of those with problems are suffering this particular fault. A large number of other reasons must be ruled out before a MacBook owner should become convinced their machine is one which suffers this problem. Bad RAM, poorly seated RAM, improperly installed hard drive, corrupted OS, corrupted plists, bad batteries, bad chargers, corrupted PMU, and corrupted NVRAM all need to be ruled out first!
    My own MacBook suffered the random sudden shutdown malady and eventually required complete replacement after a logic board replacement did not solve the issue. Some of the MacBooks appear to have a hardware problem which surfaces after a period of use. Many reported their problems starting after a month of ownership. Coincidentally, that also coincided with the release of 10.4.7, but most likely that is not at the root of the sudden, random, shutdown problem.
    (However, 10.4.7 is strongly implicated in a separate MacBook problem - colored vertical lines during boot on some machines. That is probably a separate issue.)
    Description of the Random, Sudden Shutdown Problem
    MacBook suddenly shuts off to a completely powered down state seemingly at random. There are no kernel panic, mouse freezing, or other premonitory symptoms. The machine simply powers down suddenly. The screen goes black. The hard drive spins down and no sleep light illuminates. The machine simply turns itself off.
    The shutdowns may occur on either battery or with AC adapter attached. Some owners report their MacBook is less prone to sudden shut down while on battery vs AC adapter. My own afflicted MacBook would suddenly shutdown on a fully charged battery or on either of two AC adapters.
    The shutdowns occur with either 10.4.6 or 10.4.7 OS loaded. I went through several cycles of clean installs of the base 10.4.6 and the Intel Combo update to 10.4.7 before it became clear that it mattered not which OS was running. Another indicator that this is not an OS issue is that sudden shutdowns can occur in target mode and also when running just the Apple Hardware Test - which relies on minimal software to operate.
    The shutdowns tend to grow more frequent once they begin. They may worsen to the point that a machine will not complete boot up before shutting down. It may take several power up presses to start the machine. Oddly enough, a machine that had difficulty starting up, may be easy to start up several minutes later. It may run for hours or minutes before another sudden shutdown. The frequency is low and random enough that is very difficult to demonstrate this fault to a service technician.
    Some users are able to induce a sudden shutdown by running their CPU's at high load and thus heating up the machine. This is easily done by running the yes command in two Terminal windows. Some users report their MacBook is more prone to sudden shutdowns when their CPU is relatively cool. The bipolar reporting is confusing. There may be more than one type of sudden shutdown being reported. One due to CPU overheating and another due to another hardware problem which has yet to be elucidated.
    Resetting of the PMU and PRAM MAY temporarily reduce the frequency of the sudden shutdowns, but the effect is temporary. Indeed, the effect may not even be real given the randomness of the shutdowns. None-the-less, one must perform PMU and PRAM resets to ensure that some corruption of those devices is not creating a reason for shutdowns. On my own MacBook, resetting PMU and PRAM (four chimes) did not prevent the random sudden shutdowns.
    The sudden shutdowns occur with well seated stock RAM, replacement RAM, and reseated/replaced hard drives. Swapping out and testing both RAM and hard drive helps to eliminate those as the source of the problem. On my own machine, I exchanged the RAM and the hard drive to eliminate them as the cause. This made it considerably easier for the Apple genius to decide it was an internal problem.
    In my case, a logic board replacement did indeed solve the fault, but several days later, sudden shutdowns began again. Presumably either the replacement board has the same weakness as the original or some other component of the machine was the actual reason for the sudden shutdowns. The former is quite likely because the machine was made stable for several days with a new logic board. At that point, I requested to be swapped to a new machine and the Apple Store manager wisely decided to help out his customer. For that I am most grateful. However, it is unlikely that the majority of people will have their machines swapped out, but instead repaired.
    At this time, no official statement regarding cause for or acknowledgment of the MacBook's sudden random shutdown problem has been made. Because the underlying cause has not been revealed, it is impossible to know that a logic board replacement will permanently solve the problem or merely result in the same fault recurring later on the replacement board. Of course, we do not know if it actually is a logic board flaw.
    My advice to MacBook owners whose machines develop the sudden random shutdown symptoms are to...
    1. Get your data backed up immediately. The machine will likely suffer more and more frequent shutdown events.
    2. Revert to stock RAM and hard drive if you have installed after-market replacements. You must do this and see if the shutdowns continue to occur. Otherwise, the first thing blamed will be your RAM and hard drive.
    3a. Perform a PMU reset, by shutting down the MacBook. Removing the battery. Disconnect the AC Adapter. Then, press the power button for five seconds. The reinstall the battery and mains adapter. Restart the machine.
    3b. Reset PRAM by holding option-command-P-R keys down during startup until you hear the chime at least three or four times.
    Resetting the PMU and PRAM are standard procedures you'll otherwise be asked to perform to diagnose your machine.
    4. Do a CLEAN install of the OSX if you wish to totally eliminate a bad OS install as the problem. This will destroy all your data. Alternatively, an archive and install will be helpful without totally destroying your data, but that will not let you exonerate your system files and settings. An alternative is to run Apple's hardware test utility which is found on your OS installation disc. However, an extended hardware test is needed because the shutdown flaw may take hours to surface.
    Note: If your MacBook has become so "narcoleptic" that it cannot even complete a boot up sequence, try holding the power button down until you hear a loud beep. That may allow an otherwise balky machine to start.
    Once you have done the above, and are still seeing random sudden shutdowns, you have largely done the preliminary footwork that you'll need to prove whether your MacBook has this particular problem and not something more common. Then, call AppleCare or visit your Apple Genius to have the machine repaired or replaced. Hopefully, the root cause of this problem will be discovered, disclosed, repaired and prevented. For now, it appears only a fraction of the MacBooks are suffering this fault, but the machine population is still young. Overall, the MacBook is perhaps the finest laptop I've bought from Apple. It will be nice to trust the machine to not lose my work.
    BTW - resetting PMU may induce a separate 10.4.7 related bug which results in your MacBook exhibiting a white screen with progressively more numerous vertical color lines during startup. This appears to be fixable by resetting PRAM and then temporarily changing display resolution to something other than the current setting and then back.

    thanks for the comprehensive info. i experienced this for the first time today. i bought my macbook the day they were released. the shutdown happenned for me after leaving my computer on overnight with no programs running. about two minutes into web browsing it shutdown. it then shutdown in the middle of restarts. i disattached power cord, external hard drive, dvd burner & ethernet & it powered up and has been working for about 20 minutes since.
    this computer has really been a lemon. first my superdrive scratches the **** (just previewed this, i can't believe they sensor the h_ word?) out of discs, then the trackpad button becomes very hard to push. i've been working around those issues using an external dvd burner and mouse, but not sure how to work around sudden shutdowns. i haven't been able to send it in for repairs yet since i bought it cause i needed it's dvd authoring capabilities for a class i was taking, plus i wanted to make sure nothing else went wrong (self fulfilling prophecy?). i was planning on taking it on vacation with me, but guess i better pack my old ibook too (which other than a cd burner which sucked from the start, has been very reliable). i'll send in my macbook when i get back.
    anyway, thanks for the info & advice! i'll back up my crucial data now.
    white macbook, 2GHz, 1GB ram (factory installed) Mac OS X (10.4.7)
    macbook Mac OS X (10.4.6)
    macbook   Mac OS X (10.4.6)  

  • Capturing DVCAM in FCP 6.0.2 and encountering strange capture behavior

    I have FCP 6.0.2 and OSX 10.5.2 and QT 7.3.1. I have been capturing several DVCAM cassettes using my Sony DSR-20 deck. Although I have done this countless times before in earlier versions of FCP, I am encountering some strange repetitive behavior. I am capturing 30 minute clips one at a time. When I use batch capture it will cue the tape up properly to the in point...and then start capturing until it gets to about 10-12 minutes in, and then capture unexpectedly stops, no dialogue box, the tape rewinds and starts capturing again from the original in point. On this second capture, the tape sails past the 10 minute mark and keeps going to the end of the 30 minute clip. It then stops, gives me the dialogue box that it has successfully captured. And it has.
    But every DVCAM tape I captured today exhibited the same behavior. Capture would be successful until about about 10 minutes in, then FCP aborts (no dropped frame message, no dialogue box) rewinds the tape back to the in point, tries again, and this time succeeds with the second pass capturing the entire clip. Note at the 10 minute mark there is no scene change or no camera start/stop.
    Have other users experienced this issue? And if so, is there a workaround or a possible patch forthcoming from FCP?
    Many thanks,
    John

    Yes, each tape has an in and out point defined. In my 6 years of editing with Final Cut and DVCAM tapes I've never encountered this issue before in the capturing process until now. I will have to see in future weeks with other captures whether this is an on-going issue or not, but at least I can capture for now.

  • Iphone 5s: surprise shutdowns at lower battery %

    Iphone 5s; Version 8.1.1
    As soon as my iphone was a one year old in November, 2014 I started having this issue. I have not been able to track a pattern as to when this happens.
    Issue: When the battery is low enough: 25-40%, and I am trying to use my phone. It would suddenly hang and then shut down. When I try to turn it back on with the power key, the phone indicates no battery and asks for a plugin for charge. As soon as I plugin, the phone turns back on, and the battery is now low any more, it is at whatever percentage it was before it got shut down.
    Is there any one out there with such an issue? I feel that there is a defect in the battery or a bug in software.
    I am annoyed by this because I cannot trust my phone any more, it can power down randomly when I need it. Whats even more frustrating is that this problem started right after my warranty expired. I have owed iphone before, I am disappointed that the quality is degrading.

    You should get your phone checked by visiting an Authorized Apple Service Provider or Apple Store next to your place,
    or contact Apple Support and talk to them. They can check the battery online.
    You can also visit this page to do that: iPhone - Contact Support - Apple Support
    Click on Apple Support, then on ->Battery, Power &Charging ->Battery questions and troubleshooting, and follow the instructions.

  • Mid 2010 Macbook Pro 13" sudden shutdown with no errors

    I have a mid 2010 Macbook Pro 13" 2.66 GHz with 2x4GB of Crucial RAM, the original 320GB HDD and running OS X 10.10.1; however, this problem has already been bugging me back when I had Mavericks. For about a year and a half now my laptop would suddenly shutdown with a click sound. It first only did it about once every couple of weeks but now it'll sometimes do it within five minutes of turning it on. Sometimes it'll last a couple hours, and other times it'll last 5 seconds. It's not temperature related, because it'll do it whether it has just been turned on or been on for over an hour. I reset the PRAM and SMC, but that didn't fix it. I ran tests with Disk Utility and it said there were some issues with the disk. Disk Utility wasn't able to do it, so I repaired it with fsck in Single User Mode. I thought this was finally going to work, but within 15 minutes it shut down again. Finally I ran the Apple Hardware Test and put it through the extensive test. After it was done running, it said that everything was ok. So according to that there should be nothing wrong with the internal hardware. I would check in the console logs, and it would give me -2 and -60 for "Previous shutdown cause: ". At this point I have no idea what could be causing the problems.

    I took it in to the Genius Bar over the weekend, and they ran their tests on it. It passed with flying colors; including the battery, which is doing quite well for its age. So with that being said, they said that the problem is probably with the logic board since everything else came back ok. At this point, I am better off investing in a new computer since a new logic board goes for $400 without labor, and that is if the problem really is only with the logic board since that was their best guess, not definitive.

  • Bug in my code or strange memory behavior ?

    Hi, Guys !
    It's been a while since I post something in this forum - trying to use your help when it's really needed.
    So, here we go ...
    (we use Oracle 8.1.7 on Unix box and SQL * Plus 8.1.6)
    While back I wrote "core" PL/SQL package that resides in let's say DB1 database. It has RECORD_EXISTS_FNC function designed to dynamically check If the record exists in certain table/view. Assumptions are that you pass in :
    Table/View name, Column name, and unique numeric value (because by DBA rules all of our Tables have SEQUENCE as a Primary Key. And I plan soon to put in overloaded function to accept unique character value)
    Also every Table has SYS_TIME_STAMP and SYS_UPDATE_SEQuence columns that populated by Trigger before Insert/Update representing Last Update time_stamp
    and how many times record was updated within same second.
    (in case more than one User updates same record in same time - that was written before Oracle had more granular date/time). So function has SYS_TIME_STAMP and SYS_UPDATE_SEQUENCE parameters (optional) accordingly.
    And It looks something like :
    FUNCTION RECORD_EXISTS_FNC
    (iBV_NAME IN USER_VIEWS.VIEW_NAME%TYPE,
    iPK_FIELD IN USER_TAB_COLUMNS.COLUMN_NAME%TYPE,
    iPK_VALUE IN NUMBER,
    iSYS_TIME_STAMP IN DATE DEFAULT NULL,
    iSYS_UPDATE_SEQ IN NUMBER DEFAULT NULL) RETURN BOOLEAN IS
    TYPE REF_CUR IS REF CURSOR;
    CR REF_CUR;
    i PLS_INTEGER DEFAULT 0;
    vRESULT BOOLEAN DEFAULT FALSE;
    vQUERY USER_SOURCE.TEXT%TYPE;
    BEGIN
    vQUERY := 'SELECT 1 FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''')
    AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    IF iBV_NAME IS NOT NULL AND
    iPK_FIELD IS NOT NULL AND
    iPK_VALUE IS NOT NULL THEN
    OPEN CR FOR vQUERY;
    FETCH CR INTO i;
    vRESULT := CR%FOUND;
    CLOSE CR;
    END IF;
    RETURN vRESULT;
    EXCEPTION
    WHEN OTHERS THEN
    IF CR%ISOPEN THEN
    CLOSE CR;
    END IF;
    INSERT_ERROR_LOG_PRC ('CORE_PKG', 'ORACLE', SQLCODE, SQLERRM, 'RECORD_EXISTS_FNC');
    RETURN vRESULT;
    END RECORD_EXISTS_FNC;
    So the problem is when I call this function from let's say
    database DB2 (via db remote link and synonym) and I know exactly that record does exists (because I am selecting those SYS fields before pass them in) - I get the correct result TRUE. The other programmer (Patrick) calls this function within same DB2 database, within same UserID/password (obviously different session), running exactly the same testing code and gets result FALSE (record doesn't exist, but it does !) He tried to Logoff/Login again several times within several days and try to run it and still was getting FALSE !
    I tried to Logoff/Login again and I was getting mostly TRUE and sometimes FALSE too !!!
    I thought may be It has something to do with REF CURSOR that I use to build SQL on the fly, so I changed to NDS
    using EXECUTE IMMEDIATE statement - nothing changed.
    vQUERY := 'SELECT COUNT (1) FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''') AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    EXECUTE IMMEDIATE vQUERY INTO i;
    vRESULT := NOT (i = 0);
    RETURN vRESULT;
    Interesting note : when Patrick doesn't pass SYS parameters (Time_stamp, Update_sequence), or passes NULLs - function always finds the record ! (Statement 2 below)
    May be it has to do with the way TO_DATE () function gets parsed in that dynamic SQL - I don't know ...
    Here's the test code :
    SET SERVEROUTPUT ON;
    DECLARE
    SYS_TIME DATE;
    SYS_SEQ NUMBER;
    bEXISTS BOOLEAN DEFAULT FALSE;
    BEGIN
    SELECT SYS_TIME_STAMP, SYS_UPDATE_SEQ INTO SYS_TIME, SYS_SEQ FROM LOCATION_BV WHERE PK = 1;
    bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, SYS_TIME, SYS_SEQ); -- STATEMENT 1
    --bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, NULL, NULL);        -- STATEMENT 2
    IF bEXISTS THEN
    DBMS_OUTPUT.PUT_LINE ('TRUE');
    ELSE
    DBMS_OUTPUT.PUT_LINE ('FALSE');
    END IF;
    END;
    I asked our DBA, he has no clue about this strange inconsistent results.
    I debugged line by line, extracted that generated SQL and ran it in same account - works fine !
    Does anyone knows or have clues or can help what's going on ???
    I don't know If this is bug in my code or strange memory behavior ?
    (Please let me know If anything unclear)
    Thanx a lot for your help and time !
    Steve K.

    see your other thread
    Bug in my code or strange memory behavior ?

  • Sudden shutdowns at a specific time

    I have a Dual-Core 2x2.66 Mac Pro that has a strange sudden shutdown issue. I don't have any mixed RAM or anything like that. Nor do I have an PCI cards for expansion. The Mac just has a couple of Apple SATA drives internally and a few FireWire drives on it's ports.
    I did a search but didn't find anything that duplicates my problem.
    Basically the Mac does a sudden shutdown and reboot every so often with varying frequency (sometimes several times a week, sometimes once a week).
    The odd things is that other than a rare exception, it always occurs at a specific time of day (8:41 am to be exact).
    My first thought was that perhaps I have some software that is running an automatic, prescheduled function at that time and that is causing the problem. But a review of the software I have installed that I know does this type of thing reveals no prescheduled activities at this time. I have even tried to watch my Activity Monitor at that time and of course the times that I do so, the shutdown doesn't occur.
    It seems to me it maybe software/system related, but I hesitate to go all out and wipe my system and reinstall everything because of the sheer number of Apps I have loaded (I do graphics and video work so I am running full suites of Apple and Adobe stuff as well as a bunch of other stuff).
    I would certainly do so if I were sure that were the problem, but I don't want to do that if it isn't going to resolve anything?
    I had a similar issue with an iMac, but that was not time of day dependent and occurred far more frequently - AppleCare replaced the power supply.
    Any thoughts on the cause?
    Thanks

    As a test try deleting the /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist file. You might also try booting into safe mode to see if that makes a difference. Also creating a new user account and logging into that account (log out of your normal account) may also be useful in troubleshooting this.

Maybe you are looking for