Recovery to a time before the last resetlog issue
Hi experts!
Env: 11.2.0.2 including a 11.2.0.2 RMAN recovery catalog.
Having big trouble understanding what is happening here.. I'm trying to return my database to a time before the last resetlogs time, but cannot as RMAN always gives "RMAN-20011: target database incarnation is not current in recovery catalog". And yes, I've reset database to previous incarnation.
[oracle@targetdb backup]$ rman
Recovery Manager: Release 11.2.0.2.0 - Production on Wed May 15 22:01:39 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN> connect target
connected to target database: TRGDB (not mounted)
RMAN> connect catalog rman/rman@rmancat
connected to recovery catalog database
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 15 TRGDB 1659522178 PARENT 1 13.08.2012 06:51:46
1 16 TRGDB 1659522178 ORPHAN 765647 31.10.2012 07:47:00
1 17 TRGDB 1659522178 PARENT 765821 31.10.2012 07:53:07
1 18 TRGDB 1659522178 PARENT 815390 05.11.2012 14:41:39
1 19 TRGDB 1659522178 PARENT 816252 05.11.2012 15:05:16
1 2 TRGDB 1659522178 PARENT 1825516 24.04.2013 21:33:32
1 523 TRGDB 1659522178 PARENT 2127837 13.05.2013 13:24:51
1 521 TRGDB 1659522178 PARENT 2181465 14.05.2013 08:57:42
1 1154 TRGDB 1659522178 CURRENT 2257381 15.05.2013 21:32:08
RMAN> reset database to incarnation 521;
database reset to incarnation 521
RMAN> restore controlfile from '/home/oracle/backup/c-1659522178-20130515-00';
Starting restore at 15.05.2013 21:50:54
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/home/oracle/oradata/TRGDB/controlfile/o1_mf_82l1ml9w_.ctl
output file name=/home/oracle/oradata/fast_recovery_area/TRGDB/controlfile/o1_mf_82l1mljs_.ctl
Finished restore at 15.05.2013 21:50:55
RMAN> sql "alter database mount";
sql statement: alter database mount
released channel: ORA_DISK_1
RMAN> run
2> {
3> set until time "to_date('15-05-2013 20:15:00','dd-mm-yyyy hh24:mi:ss')";
4> restore database;
5> recover database;
6> }
executing command: SET until clause
Starting restore at 15.05.2013 21:52:07
Starting implicit crosscheck backup at 15.05.2013 21:52:07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=12 device type=DISK
Crosschecked 12 objects
Finished implicit crosscheck backup at 15.05.2013 21:52:09
Starting implicit crosscheck copy at 15.05.2013 21:52:09
using channel ORA_DISK_1
Finished implicit crosscheck copy at 15.05.2013 21:52:09
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_15_8s7rosfg_.arc
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_16_8s7rosg0_.arc
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_1_8s7rp9st_.arc
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_2_8s7rp9lt_.arc
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_17_8s7rorkn_.arc
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_14_8s7rory4_.arc
skipping datafile 8; already restored to file /home/oracle/oradata/TRGDB/datafile/o1_mf_aud_trai_8qlfhw19_.dbf
restore not done; all files read only, offline, or already restored
Finished restore at 15.05.2013 21:52:11
Starting recover at 15.05.2013 21:52:11
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/15/2013 21:52:11
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20011: target database incarnation is not current in recovery catalogThe controlfile I restored above ('/home/oracle/backup/c-1659522178-20130515-00') is from before the last resetlogs.
Also I notice in the alert log during "searching for all files in the recovery area.."
Wed May 15 21:52:09 2013
Setting recovery target incarnation to 9
Setting recovery target incarnation to 9It seems to me that RMAN "ups" the incarnation back to the CURRENT one (the one before I ran reset incarnation command).
But why?
I'm obviously doing something wrong here, please shed some expert enlightment.
Thanks!
Hello;
Been awhile, probably time for me to test this again. Here's what I think :
The database with the DBID (1659522178) and DBINC_KEY (521) has to be reset in the recovery catalog and re-registered for its backups to resume.
RMAN> reset database to incarnation 521;
database reset to incarnation 521
RMAN> register database;In my way old notes I do :
RMAN> connect target sys/sys
RMAN> startup nomount
RMAN> restore controlfile from'....
RMAN> Alter database mount
RMAN> reset database to incarnationSo use target database controlfile instead of recovery catalog
Best Regards
mseberg
Edited by: mseberg on May 15, 2013 6:12 PM
Similar Messages
-
ORA-01190: control file or data file 1 is from before the last RESETLOGS
hi, experts.
i have oradb 11g and using it for OIM11
after some actions in oim i try to get my db to previous state (many times it was done successfully)
but now i have problem ORA-01190: control file or data file 1 is from before the last RESETLOGS
im runing in noarchivelog mode
i have autobackup of controlfile and i have 2 backups of my db
please help me
maybe some one know how to restore my backup to new db and then change configuration of wls and oim...Hi, Thanks for reply
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 OIMDB 2372279074 PARENT 1 02-APR-10
2 2 OIMDB 2372279074 PARENT 940976 11-JUL-11
3 3 OIMDB 2372279074 PARENT 5590849 09-AUG-11
4 4 OIMDB 2372279074 PARENT 5590850 10-AUG-11
5 5 OIMDB 2372279074 PARENT 5596482 11-AUG-11
7 7 OIMDB 2372279074 PARENT 5596483 11-AUG-11
8 8 OIMDB 2372279074 PARENT 5596484 12-AUG-11
6 6 OIMDB 2372279074 ORPHAN 5622931 11-AUG-11
9 9 OIMDB 2372279074 PARENT 5627526 18-AUG-11
10 10 OIMDB 2372279074 PARENT 5627527 18-AUG-11
11 11 OIMDB 2372279074 ORPHAN 5627528 18-AUG-11
12 12 OIMDB 2372279074 CURRENT 5627528 18-AUG-11
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
9 Full 1.50G DISK 00:00:31 12-AUG-11
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20110812T114515
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_12\O1_MF_NNNDF_TAG20110812T114515_749PJDCW_.BKP
List of Datafiles in backup set 9
File LV Type Ckp SCN Ckp Time Name
1 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSTEM01.DBF
2 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSAUX01.DBF
3 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\UNDOTBS01.DBF
4 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\USERS01.DBF
5 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIMLOB.DBF
6 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_IASSDPM.DBF
7 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_MDS.DBF
8 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_SOAINFRA.DBF
9 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIM.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
10 Full 9.36M DISK 00:00:01 12-AUG-11
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20110812T114515
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_12\O1_MF_NCSNF_TAG20110812T114515_749PKJJS_.BKP
SPFILE Included: Modification time: 12-AUG-11
SPFILE db_unique_name: OIMDB
Control File Included: Ckp SCN: 5627525 Ckp time: 12-AUG-11
BS Key Type LV Size Device Type Elapsed Time Completion Time
11 Full 1.33G DISK 00:00:26 16-AUG-11
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20110816T094954
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_16\O1_MF_NNNDF_TAG20110816T094954_74N183D7_.BKP
List of Datafiles in backup set 11
File LV Type Ckp SCN Ckp Time Name
1 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSTEM01.DBF
2 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSAUX01.DBF
3 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\UNDOTBS01.DBF
4 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\USERS01.DBF
5 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIMLOB.DBF
6 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_IASSDPM.DBF
7 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_MDS.DBF
8 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_SOAINFRA.DBF
9 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIM.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
12 Full 9.36M DISK 00:00:01 16-AUG-11
BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20110816T094954
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_16\O1_MF_NCSNF_TAG20110816T094954_74N197JO_.BKP
SPFILE Included: Modification time: 16-AUG-11
SPFILE db_unique_name: OIMDB
Control File Included: Ckp SCN: 6118204 Ckp time: 16-AUG-11How to reset database to right incarnation.? -
How do I revert OS X back to a time before the last update on 28th June?
Hi.
Last Tuesday, 28th June, I authorised Mac Update to update two things. One was something to do with my Epson printer, and the other was some sort of security update for Mac OS X itself. The update, presumably the latter part, invoked a requirement to restart my Mac.
Since then things have not been good.
I have noticed that the fans in my MacBook Pro are on more or less continuously, even when it is asleep. Prior to last Tuesday they hardly ever ran, even when I was using it. (According to iStat my CPU is currently 76 degrees C, and both fans are running at about 6000 rpm.)
When I try to quit Safari it doesn't quit straight away as it used to. Instead I get the spinning ball for a while and then, after it quits I get a 'Safari quit unexpectedly' report, even though it was I who initiated the quitting...
Several apps have been acting oddly too, such as MS Word taking ages to launch.
So I want to revert my MacBook Pro to how it was prior to this last update. I have Time Machine enabled, but I can't work out how to get the actual OS back to a state it was on a date prior to 28th June. The OS isn't in the Apps folder, and I can't work out where it might be.
Can someone please point me in the right direction, or is this something that Time Machine cannot do?Your slow down issues sound like it's internet related.
http://support.apple.com/kb/TS3802
Under your System Prefs > Network > Advanced > Airport > TCP/IP Configure IPv6: OFF Reboot.
Run ALL of the free OnyX cleaning and maintainence
features and reboot.
Also run the Verify>Preferences and write down any corrupted
ones, move these files to your desktop (out of yourLibrary/
Preferences folder) and reboot, they get rebuilt automatically.
(more free good stuff you'll likely wind up needing)
VLC (plays anything)
Perian (installs additionalQuicktimecodecs)
FlipForMac (Windows media in Quicktime)
TheUnarchiver(unpacks just about everything)
Carbon Copy Cloner (clonesbootdrive to another HFS+j drive, hold option bootable)
2 free 3D games - NexiuZClassic and Cube 2 Sauerbraten
LibreOffice (freeofficesuit, reads/writes Office files
Gimp (free image editor)
OnyX (free maintainenceandcleaning)
Pacifist (opens DMG filesforextraction)
Mactracker (inforonApple products)
NTFS Mounter (for WindowsNTFSdrives)
EasyFind(deep search)
TimeMachineEditor
TinkerTool
ClamXav (free anti-virus)
Caffine (keeps yourMacawake)
Browswerplug-in check (especially for Flash!) -
Pages on my iPad3 has become very slow to open documents after upgrading to ios7.
I posted on here about this a few weeks back and someone suggested force-closing Pages -- and that does indeed enable me to open things -- but I have had to force-close many times in the last 24 hours, which is worrying. Are there any other suggestions?
I am sometimes also finding that, when I have been writing something and then click on "documents" the screen goes blank, there is a wait of around a minute and then the same document is re-displayed, before clicking "documents" again lets me look at other documents -- which is a pain if I am trying to move between documents repeatedly. Again, words of wisdom on this would be great.
Pages under iOS6 opened quickly, and there was an immediate loss of performance when I upgraded. I am finding this very frustrating because I don't feel that the new Pages has added to the facilities I was using, but a slowness to open documents is frustrating.
Thanks
MarkPages on my iPad3 has become very slow to open documents after upgrading to ios7.
I posted on here about this a few weeks back and someone suggested force-closing Pages -- and that does indeed enable me to open things -- but I have had to force-close many times in the last 24 hours, which is worrying. Are there any other suggestions?
I am sometimes also finding that, when I have been writing something and then click on "documents" the screen goes blank, there is a wait of around a minute and then the same document is re-displayed, before clicking "documents" again lets me look at other documents -- which is a pain if I am trying to move between documents repeatedly. Again, words of wisdom on this would be great.
Pages under iOS6 opened quickly, and there was an immediate loss of performance when I upgraded. I am finding this very frustrating because I don't feel that the new Pages has added to the facilities I was using, but a slowness to open documents is frustrating.
Thanks
Mark -
When closing Firefox windows, I would like a warning before the last window closes. The about:config settings do nothing. There is a warning for multiple tabs... why not for the last window? I do not use tabs... just windows... I have a mouse button programmed for that. It is really irritating to have to restart Firefox all the time and then open the history window because no warning was issued!
This is ridiculous. I've had this problems for years now and I'm finally walking away from Firefox. I use my keyboards more than my mouse, and how many times does your finger slip and hit Command Q instead of W. How come FF can't reset something as trivial as this? So many people are having problems with this?
Feels like FF has become too big, too slow and just not cooperative anymore. What a shame, I've been using Netscape/Firefox for 13 years. This is silly. -
my PowerBook G4 has crashed 4 times in the last week. I got a message that there is a problem with the Mac OS Kernal. Does anyone know what this means?
Kernel panics are usually caused by a hardware problem – frequently RAM, a USB device or a Firewire device. What external devices do you have connected? When trying to troubleshoot problems, disconnect all external devices except your monitor, keyboard and mouse. Do you experience the same problems?
To eliminate RAM being the problem, Look at this link: Testing RAM @ http://guides.macrumors.com/Testing_RAM Then download & use Memtest & Ramber.
Do you have an Apple Hardware Test disc? Running the Apple Hardware Test in Loop Mode is an excellent troubleshooting step for finding intermittent hardware problems. It is especially useful when troubleshooting intermittent kernel panics. If Loop Mode is supported by the version of the Apple Hardware Test you are using, you run the Extended Test in Loop Mode by pressing Control-L before starting the test. Looping On should appear in the right window. Then click the Extended Test button.The test will run continuously until a problem is found. If a problem is found, the test will cease to loop, indicating the problem it found. If the test fails, be sure to write down the exact message associated with the failure.In some cases, RAM problems did not show up until nearly 40 loops, so give it a good run.
May be a solution on one of these links.
http://support.apple.com/kb/TS3742 What's a "kernel panic"? (Mac OS X)
http://www.macmaps.com/kernelpanic.html Mac OS X Kernel Panic FAQ
http://www.index-site.com/kernelpanic.html Mac OS X Kernel Panic FAQ
http://www.thexlab.com/faqs/kernelpanics.html Resolving Kernel Panics
http://www.macfixit.com/article.php?story=20060911080447777 Avoiding and eliminating Kernel panics
http://macosg.com/group/viewtopic.php?t=800 12-Step Program to Isolate Freezes and/or Kernel Panics
Cheers, Tom -
After a recover database, how can I find the time of the last transaction?
After doing a restore and recovery. Is there something in the data dictionary that I can query to find the time of the last applied transaction that took place during the recover process?
restore database ;
recover database ;
For example, if I restored from a full backup on 8/3/2008 with archive redologs, I know my last restored transaction is from sometime on that day, but I'd like a way to know the hour:minute:second of the last transaction included in the backup and redologs that was applied to my restore. Is that possible?
The recover database applies all available redo logs for that day, but I want to know if that includes transaction up to 6PM, or 11:50PM, etc?
Thanks,
JasonIf you did only a "recover database" that would have been a Complete Recovery to the last transaction -- ie the point when the database was shutdown.
For an Incomplete Recovery, you would have to note the Sequence#, SCN or Timestamp of the recovery point. -
i can not get itunes to install and open on my new laptop i am so frustrated i uninstalled and reinstalled at least a dozen times in the last month
i got a error 7 this time but have had diff ones befpre please helpWill iTunes open in safe mode? Hold down CTRL+SHIFT as, or immediately after, you click the icon that starts iTunes and keep holding until you see this prompt.
Click Continue.
Assuming iTunes has opened, enable the menu bar, if necessary, with CTRL+B. Then go to Edit > Preferences > Store and untick Show iTunes in the Cloud purchases. Press OK, close iTunes, wait until it has had a chance to fully close then reopen.
Will iTunes open normally now?
If not, see Troubleshooting issues with iTunes for Windows updates for genral advice.
The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
tt2
tt2
Message was edited by: turingtest2 -
is it possible to stop the system time out on my imac? i have tried 5 times in the last 24 hrs.it will run for approx.3hrs,and then times out and i have to start
from the beggining againWhat is the url of the file your are downloading?
What web browser are you using?
What type of connection do you have to your isp? phone line, dsl, cable, fios...
Try iCab. It lets you restart a download.
icab.de
Robert -
Lately I have been getting a rectangular screen titled Login Setting, with my Username and Password and asking me to Login. This screen shows up on opening the computer and has never been seen before the last month or so. It has one box titled Login Credentials with a username and password field and a second box titled Login Status at the bottom where it says "Profile not found" in red. I've never seen this before and ignoring it does not effect any operations. Is this legitimate or some kind of identity fishing?
Hello,
Have you done the recent Security updates?
Is this from Sleep or on bootup?
Timing is about right for the FlashBack attack.
Disable Java in your Browser settings, not JavaScript.
http://support.apple.com/kb/HT5241?viewlocale=en_US
http://support.google.com/chrome/bin/answer.py?hl=en-GB&answer=142064
http://support.mozilla.org/en-US/kb/How%20to%20turn%20off%20Java%20applets
Flashback - Detect and remove the uprising Mac OS X Trojan...
http://www.mac-and-i.net/2012/04/flashback-detect-and-remove-uprising.html
In order to avoid detection, the installer will first look for the presence of some antivirus tools and other utilities that might be present on a power user's system, which according to F-Secure include the following:
/Library/Little Snitch
/Developer/Applications/Xcode.app/Contents/MacOS/Xcode
/Applications/VirusBarrier X6.app
/Applications/iAntiVirus/iAntiVirus.app
/Applications/avast!.app
/Applications/ClamXav.app
/Applications/HTTPScoop.app
/Applications/Packet Peeper.app
If these tools are found, then the malware deletes itself in an attempt to prevent detection by those who have the means and capability to do so. Many malware programs use this behavior, as was seen in others such as the Tsunami malware bot.
http://reviews.cnet.com/8301-13727_7-57410096-263/how-to-remove-the-flashback-ma lware-from-os-x/
http://x704.net/bbs/viewtopic.php?f=8&t=5844&p=70660#p70660
The most current flashback removal instructions are F-Secure's Trojan-Downloader:OSX/Flashback.K.
https://www.securelist.com/en/blog/208193454/Flashfake_Removal_Tool_and_online_c hecking_site
More bad news...
https://www.securelist.com/en/blog/208193467/SabPub_Mac_OS_X_Backdoor_Java_Explo its_Targeted_Attacks_and_Possible_APT_link -
E_IO_CANNOT_OPEN error message. Often get this 1-2 times before the book downloads to ADE3.0. Why?
Hi,
So I've fixed the activation error, but when trying to get an ebook from the sample site I'm now getting "LICENSE_SIGN_ERROR." And I'm still getting the license error (CANNOT_OPEN) when trying to download library books, no matter how many times I de/reauthorize ADE, restart the computer and the program, and try to dl the book from the library website.
Thanks for any additional advice!
Edit, a few days later - still experiencing the problem, no matter how many times I try to download the library book I get the same error. Any ideas? Thanks @shreya -
The events of the last month, with the photographs have suddenly disappeared from the iPhoto Library. I have opened these successfully several times during the last few weeks, but on opening them yesterday they weren't there any longer. No idea how this could have happened! Is it possible to retrieve ???
Option 1
Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
If that fails:
Option 2
Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
Regards
TD -
Retrive a record before the last inserted record
Hi,
I use simple select statement to retrive records where cola = 'Yes':
select * from tbl1
where cola = 'Yes';
The result gives me about 10 records with different date.
From the above result, I want to get the record right before the last inserted record according to the date field; which means I can not use MAX function (all I want just one record).
If I write a function to return a date and passes it back to the SELECT statement, I'll get a date for each record, which I don't want.
I know there's a way to do that in PL/SQL.
Plese help me.
pemselect * from (
select * from
(select * from (select * from (table> order by <date> desc) where rownum < 3)
order by <date>) where rownum =1 -
Timer works if I set the time before the current one
Hi,
I've got a block that is part of an actionListener that has 4 buttons, anyway I want the timer to execute something exactly at the time I set it.....but in the code that I have it also executes if i set the time before the current time
Here's the segmant:
private class ButtonResponder implements ActionListener
public void actionPerformed(ActionEvent event)
if (event.getSource() == exitButton)
System.exit(0);
if(event.getSource() == setButton)
int hour = Integer.parseInt(hours[hourComboBox.getSelectedIndex()]);
int min = Integer.parseInt(minutes[minuteComboBox.getSelectedIndex()]);
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, hour);
calendar.set(Calendar.MINUTE, min);
calendar.set(Calendar.SECOND, 0);
Date time = calendar.getTime();
timer = new java.util.Timer();
timer.schedule(new TimerTask()
public void run()
JOptionPane.showMessageDialog(null, "it is time");
, time, 5*1000);
if (event.getSource() == cancelButton)
timer.cancel();
}So if I put zeros in hours and minutes it will execute immediately....how can I make execute at the exact time (so that if the time now is 2:00 and I set it to 1:00 it only executes the next day??
Message was edited by:
OctavianBump the day if the time is less than current time.
Kaj -
Smartforms - Identify the page just before the last page
Hi,
I need to add OMR code into a Smartforms, I print my form in duplex mode, and my OMR code must be only in the odd page (1, 3, 5, 7 ...).
In the OMR code, I must set the end of the grouping, this end occurs at the last odd page. But if the last page is pair (2 4 6 8 ...), I need to the the ending code to the page just before the end.
So, I need to identify the page just before the last page.
My problem is, when I debug the Smartforms, the SFSY-FORMPAGES contains the actual page, not the value of the last page.
if someone have an idea ..
FredMaybe I found the solution :
Note 359009 - Postprocessing and query of the total number of pages
I check and make a return (if a day someone have the same problem)
Fred
Maybe you are looking for
-
Hello, I have CS3 running on a 32-bit Windows Vista computer. I downloaded the latest Camera Raw plug-in, unzipped it, and installed it, but I still cannot view my Nikon D300 NEF files. I have made sure that I only have the one plug-in mentioned. I w
-
Sent Messages Not Showing Up?
Emails that I am sending from my iCloud account on my iPhone are being saved to the server but a copy is not stored on any of my devices (iPhone/iPad/Macbook). So if I go to the sent mailbox on the phone, the message does not appear there. I changed
-
Drive space usage is greater that sum of folder space
I just created a new boot disk and then restored files from Time Machine. didn't restore everything, which would have amounted to about 248 GB. But when I look at the information (Get Info) for the drive under Devices is is currently showing that the
-
Vector importing into Photoshop
I have a Acrobat file exported from a vectory map. But when I open it in Photoshop it rasterizes it. I have Acrobat Pro also. Is there any file format Photoshop can inport and keep it as a vector? Is there any way Acrobat pro can export to such
-
Hello experts, I'm a labview newbie, but I haven't found anything that's quite like this in the knowledge base: Below is a simplified version of a data collection vi I built. The vi in the screenshot uses a random number generator, but my real vi p