EMERGENCY: Need to flashback table, how to find SCN for a time before update happened?

Hi all,
I've got a new database 11G, I've not used flashback before, but my retention time is a day...I have a time that the developer did a massive update to a table to corrupt it.
How do I find the SCN for that time so I can attempt to flashback that table?
Thank you,
cayenne

Thank you..I also found this works:
SQL> select timestamp_to_scn(to_timestamp('20140103152000','YYYYMMDDHH24MISS')) scn from dual;
       SCN
  98344246
Well that might NOT work all of the time. But that is just what Oracle does when you give it a timestamp to flashback to: it converts the timestamp to an SCN and then restores data based on that SCN.
See Flashback Table in the SQL Language doc
http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9012.htm
TO TIMESTAMP Clause
Specify a timestamp value corresponding to the point in time to which you want to return the table. The expr must evaluate to a valid timestamp in the past. The table will be flashed back to a time within approximately 3 seconds of the specified timestamp.
That 'approximately 3 seconds' accuracy is due to that conversion to SCN - Oracle uses its internal table.
SCN is accurate if you know it but you usually don't.
Read, and heed, these warnings in the advanced app dev guide
http://docs.oracle.com/cd/B28359_01/appdev.111/b28424/adfns_flashback.htm
Guidelines for Oracle Flashback Query
  If a possible 3-second error (maximum) is important to Oracle Flashback Query in your application, use an SCN instead of a timestamp. See General Guidelines for Oracle Flashback Technology.
General Guidelines for Oracle Flashback Table
  To query past data at a precise time, use an SCN. If you use a timestamp, the actual time queried might be up to 3 seconds earlier than the time you specify. Oracle Database uses SCNs internally and maps them to timestamps at a granularity of 3 seconds.
     For example, suppose that the SCN values 1000 and 1005 are mapped to the timestamps 8:41 AM and 8:46 AM, respectively. A query for a time between      8:41:00 and 8:45:59 AM is mapped to SCN 1000; an Oracle Flashback Query for 8:46 AM is mapped to SCN 1005.
     Due to this time-to-SCN mapping, if you specify a time that is slightly after a DDL operation (such as a table creation) Oracle Database might use an SCN      that is just before the DDL operation, causing error ORA-1466.

Similar Messages

  • How to Find Vendor for the material  before posting  a PO

    Hi,
    I am using BAPI_PO_CREATE1 to post a PO(ME21N), in the order to fill header data I need to give Vendor information. I have filled that data with one ZTable and executed. When i executed the BAPI, it gave me result as "VENDOR is declared as some thing else for the material". Now my Query is how to know the vendor the particular material.
    Even MSEG is showing no vendor.

    Hello Krishna,
    I do not think there's any direct assignment between a material and a vendor. And I would be surprised if there's one. Let's say there are 4000 materials and 600 vendors in an R/3 System. Doesn't it sound needless to maintain for each material all the vendors ?
    Just go to the Purchasing tab for a material (MM03) and also refer to the Purchasing data for a Vendor (XK03). you will see that there's something called a <i>Purchasing Group</i>, which is common to them both. Now just read the F1 help for this field.
    Regards,
    Anand Mandalika.

  • Need to know how to find the last execution time for a function module

    HI all
    I need to know
    1) How to find out the last execution time of the function module ?
      say for eg. I have executed a func. module at 1:39pm. How to retrieve this time  (1:39pm)
    2) I have created 3 billing document in tcode VF01 i.e 3 billing doucment no. would be created in SAP TABLE "VBRP" b/w 12am to 12:30 am.
    How to capture the latest SAP database update b/w time intervals?
    3) Suppose I am downloading TXT file using "GUI_DOWNLOAD" and say in 20th record some error has happened. I can capture the error using the exception.
    Is it possible to run the program once again from 21st records ? All this will be running in background...
    Kindly clarify....
    Points will be rewarded
    Thanks in advance

    1.Use tcode STAT input as Tcode of Fm and execute .
    2. See the billing documents are created in table VBRk header and there will always be Creation date and time.
    VBRk-Erdat "date ., u can check the time field also
    So now if u talk the date and time we can filter then display the records in intervals.
    3. with an error exeption how is my txt download finished .
    once exception is raised there will not be a download .
    regards,
    vijay

  • How to find Transaction for a Known Table maintenance View

    Hello Friends,
    May I know how to find transaction for a known table maintenance View.
    Thanks,
    Best Regards,
    Sudhanshu Garg

    Goto SE16 Transaction and enter TSTCP Table
    Here PARAM = /SM30 VIEWNAME=Table name*;UPDATE=X;
    enter table name in bold.
    Thanks
    Seshu

  • How to find the Date and Time of Modification of Column in aTable?

    Hi all,
    Do  you know how to find the Date and Time of Addition of Column to a Particular Table?.
    I know however, How to find the modification time of the Table. Using the below Query :
    Select Object_Name, to_Char(Last_DDL_TIME, 'DD-Mon-YYYY HH24:MI:SS') Last_DDL from User_Objects where Object_Type = 'TABLE';
    Object_Name
    Last_DDL
    Employee
    20-Aug-2013 09:23:03
    I wanted to know the Creation or Modification Date and Timestamp of all columns of Employee Table?. Is it possible at all. If possible, How to get it?.
    Regards,
    Bhaskar M

    I agree with you on that. Since its a development enviornment I can remove the column but that not my point here.
    My whole purpose it to know whether we get the Column's Creation or Modification DateTime.

  • How to find reason for system crash?

    Hello,
    I have a test system running in VirtualBox environment and its crashing every now and then, sometimes two times a day but sometimes it lasts for 3 days before crash happens.
    system info
    root>cat /etc/*release*
    Solaris 10 10/09 s10x_u8wos_08a X86
    root>uname -a
    SunOS 5.10 Generic_142910-17 i86pc i386 i86pc
    dump files
    root>ls -l vmdump.*
    -rw-r--r-- 1 root root 116064256 Jan 13 05:35 vmdump.0
    -rw-r--r-- 1 root root 108003328 Jan 13 10:15 vmdump.1
    -rw-r--r-- 1 root root 112852992 Jan 14 18:53 vmdump.2
    -rw-r--r-- 1 root root 129236992 Jan 17 08:41 vmdump.3
    -rw-r--r-- 1 root root 122486784 Jan 17 16:39 vmdump.4
    started to use mdb
    root@cs5vs01>mdb -k unix.4 vmcore.4
    Loading modules: [ unix krtld genunix specfs dtrace cpu.generic uppc pcplusmp ufs ipc ip hook neti sctp arp usba fctl nca lofs zfs nfs random md cpc fcip sppp ]
    ::stack
    vpanic()
    kadmin+0x517()
    uadmin+0xc7()
    sys_syscall+0x17b()
    $C
    fffffe800100ee60 vpanic()
    fffffe800100eeb0 kadmin+0x517()
    fffffe800100ef00 uadmin+0xc7()
    fffffe800100ef10 sys_syscall+0x17b()I wonder how I can continue from this point? Any support would be greatly appreciated!
    Anyone knows about a good step by step debug guide? For example how to logically track down the root cause, good example commands and so on?
    Thank you!
    BR
    Daniel

    We can see from the following stack that the panic was caused by someone or some app calling uadmin(1M)
    $C
    fffffe800100ee60 vpanic()
    fffffe800100eeb0 kadmin+0x517()
    fffffe800100ef00 uadmin+0xc7()
    fffffe800100ef10 sys_syscall+0x17b()
    So the question is who/what. ::ptree will give you the process tree and you should see from that the execname responsible. What apps do you have running in this VBOX environment? Oracle RAC uses the uadmin interface because it doesn't have a failfast driver of it's own. There are several other applications who also use the uadmin syscall for similar reasons. Normally they panic the node/system because something has timed out and they need to restore cluster/system stability and integrity.
    With regards to the step-by-step guide, no such document exists because it's impossible to write one. Each crash dump is different, each person does things slightly differently. What you need to do is understand how to use the tools (typically mdb or scat) and then start poking about in crash dumps. In fact you may find scat (Solaris Crash Analysis Tool) more user friendly and easier to learn than mdb. SCAT can be downloaded from https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=SCAT-5.2-G-F@CDS-CDS_SMI
    There's some information for mdb in the man page and at the following locations:
    http://dlc.sun.com/osol/docs/content/MODDEBUG/intro-1.html
    http://download.oracle.com/docs/cd/E19253-01/816-5041/index.html
    Unfortunately Crash Dump Analysis (CDA) isn't something that can easily be done via the forums. If you raise a service request it'll come to the Kernel group and we can then have a look for you.
    Regards,
    Steve

  • Can anyone tell me how to find and restore previously purchased OS updates to my iMac?

    Can anyone tell me how to find and restore previously purchased OS updates to my iMac?

    Please go to the Apple (upper left corner) and click on About this Mac. In the resulting window, click on the numbers underneath until they display the OS version.
    Snow Leopard, Lion, and Mountain Lion are all OS X - they are 10.6, 10.7, and 10.8 respectively. After you get the OS version, click until you get the "Build" number and post that as well.
    If your Mac is from 2010, it most likely came with Snow Leopard. If you purchased Lion, then you should be able to see it under your Purchases in the App Store (not iTunes). But, first, we need to figure out what was installed on your machine after the hard drive replacement.
    Not sure about iPhoto at this point - may have to do with whaever OS version is installed. Check in Applications folder in column view and post back which version of iPhoto you have installed.

  • Im looking how to find driver for Printer HP 2300 driver window 8 (64BIT) PLEASE help !!! stuck

    Hi ,
    I need help how to find driver for my old printer HP 2300d I use USB Cable for my Laptop window 8 (64 bit)
    help I am stuck can't print anything.
    Kim

    Hi, Welcome to hp forums and enjoy your stay, feel yourself like home here!
    I am very sorry to hear this, I will try my best to help you, I am always glad to help!
    Please follow the steps i provided below:
    1. http://windows.microsoft.com/en-ca/windows7/automatically-get-recommended-drivers-and-updates-for-yo...
    Now refer to the below link and right click your printer device
    2. http://pcsupport.about.com/od/windows-8/a/update-drivers-windows-8.htm
    Sorry because of different timezone I might not be able to help/reply you right away.IF that happens I deeply apologize!
    **Click the White thumb if you like the answer.**
    **Please mark Accept As Solution if it solves your problem and only solves your problem, if you have any more questions please ask, this also helps others to solve related issues.**
    Feel yourself like home here, we are all happy to help, if you have an question reply or start a topic or pm me or an expert.

  • How 2 find program for smartform

    how 2 find program for smartform

    Hi,
    go to TNAPR table and find the driver program for the layout.
    give the layout name, if you know the output type also give it.
    OR
    go to se71 and go to the layout , check the text elements syntax then it will show the possible driver programs in the window to choose.
    that way you can find..
    Or else...
    Go to the Tcode -> NACE
    OR
    Go to the T-code 'SMARTFORMs'
    Give your form name
    go to the general attributes.
    Check the Package name.
    then go to T-Code-> SE80
    there check the program name for a package wise
    Regards,
    KK
    Message was edited by:
            Kishore Kumar Karnati

  • How to find the number of times method being called.....

    hi,
    can any one pls tell me how to find the number of times the method being called......herez the example....
    Refrence ref = new Refrence();
    for(int i = 0;i < arr.length; i++){
    if(somecondition){
    ref.getMethod();
    here i want to know how many times the getMethod() is calling...Is there any method to do this.. i have seen StrackTraceElement class..but not sure about that....pls tell me the solution....

    can any one pls tell me how to find the number of times the method being called......
    herez the example.... http://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal ? in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • Have a serial number for Acrobat 9 Standard but need a download and can only find download for Pro version.

    I did a factory reset on my old laptop and lost my Adobe Acrobat 9 Standard. I have the serial number but need a download and can only find download for Pro version. When I enter my serial number (standard) into the Pro Installation it says the number is invalid. Any idea where I can download Standard version of 9? Thanks.

    Kimg68365882 did you purchase Acrobat 9 Standard from Adobe directly?  If so and you choose to download the software instead of receive a CD then please see Find a download link on Adobe.com.
    If you originally received the software on CD then please use a computer with an optical drive to copy the contents of the CD to a USB drive.

  • How to find TCodes for Config Transactions

    Hi All,
    How do I find the TCode for a Config Activitity node?
    For example.
    OX09 is for "Maintain Storage Location"
    OB52 is for FI Period closing/opening
    I know these from google search, but how do find tcodes for other IMG activity nodes?
    Thanks in advance!

    Go to SPRO and in Menu Additional Information Click Display key and IMG activity then Sytem will show the SPRO Transaction along with path
    Else Go to Particular Node say Create Purchasing Group and Right Click on Node and Select Display Technical Info and in ID tab the Last four Charecters wud be the Trxn code.
    In SPRO-IMG screen Only Few Nodes will Show  / have the Transaction codes.

  • I've tried safe mode but I dont understand what is happening. I tried pressing the power button on and off for several times and nothing happens, I'm always stuck on an apple logo and a spinning wheel. I dont know how to get to the Partition and the DiskU

    I've tried safe mode but I dont understand what is happening. I tried pressing the power button on and off for several times and nothing happens, I'm always stuck on an apple logo and a spinning wheel. I dont know how to get to the Partition and the DiskUtility. The Apple Logo and the Progress Indicator will continue to spin and I have literally no idea what to do. i am in desperate need of help. help me pls

    Turn it off.
    Start it up again and (at the sound of the chime) press and hold the command and the R keys, hold them down until Recovery loads. When it does you will select Disk Utility and you should be on the First Aid tab when it opens, if you are not please select it. Then select the partition (in the side bar, 2nd entry on the list, see picture).
    Yours is probably called Macintosh HD.
    Once you have selected it go to the lower righthand corner of the First Aid dialog and press Repair Disk.
    This will take 10 minutes approximately. Post back when it is finished and tell me what it says.

  • I've tried safe mode but I dont understand what is happening. I tried pressing the power button on and off for several times and nothing happens, I'm always stuck on an apple logo and a spinning wheel. I dont know how to get to the Partition

    I've tried safe mode but I dont understand what is happening. I tried pressing the power button on and off for several times and nothing happens, I'm always stuck on an apple logo and a spinning wheel. I dont know how to get to the Partition and the DiskUtility. The Apple Logo and the Progress Indicator will continue to spin and I have literally no idea what to do. i am in desperate need of help. help me pls

    Reboot hold the command R for recovery.

  • HT1386 how to backup my apps and data before update to iOS5

    how to backup my apps and data before update to iOS5

    When you update, iTunes will backup your iOS device.  You can also do it manually... http://support.apple.com/kb/ht1766

Maybe you are looking for