Restore single table

I've accidentally truncated a table for the wrong schema and I need to get the data back. I realize this isn't an easy task with rman, but I'm looking for advice for the best method.
I am running Oracle Standard Edition 11.1.0.6.0 on Linux. A cold backup of this database is created every week with rman. It is not in archivelog mode, since it would generate too many log files and all the changes are fairly easy to replicate. The only method I know of is to restore the entire database on another machine, then export the table/data from the restored database and import it into the truncated table. This will take quite a bit of time (a few or several days), and seems to contain a lot of unnecessary work for the computers involved. The table was only a few 100 MB, and the DB is 1TB+.
Is there any way to restore just the tablespace with the truncated table on a new server? Can this somehow be done in another database instance on the same computer? If I can restore just one tablespace, but have to do it on a different computer, can I avoid having to transfer the entire rman backup to the new server? Is there anything like flashback that will help me on Oracle Standard Edition? Are there any other suggestions for restoring the one table more quickly?

I think everything almost worked. I restored the datafile on a new instance, along with the system, sysaux, undo and users tables. I renamed and opened the new database, and set everything up so I could query it from the database where I accidentally truncated the table.
I logged into the first database, and I ran "select count(*) from my_table@new_orcl;". It ran fine.
I ran "insert into my_table (select * from my_table@new_orcl);", and it gave me an error:
ORA-03113: end-of-file on communication channel
Process ID: 28835
Session ID: 295 Serial number:1679
SQL> select count(*) from my_table;
ERROR:
ORA-03114: not connected to ORACLE
SQL> quit
servername $sqlplus my_username/my_password
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
servername $ sqlplus / as sysdba
SQL> startup
ORA-00338: log 3 of thread 1 is more recent than control file
ORA-00312 online log 3 thread 1: ...
I issued a recover until cancel, and put in the file name of the current logfile when it asked for it, but it tells me file 1 needs more recovery to be consistent. The only error I have in the alert log is a reference to a .trc file with repeated warnings "WARNING:Oracle process running out of OS kernel I/O resources" and the ORA-00338/ORA-00312 errors before the instance terminated.
I don't know what happened, other than there are a few relevant bugs about this on my oracle support and I need to restore the 1TB database now. Based on my experiences with Oracle support on severity 1 requests, I can probably get this database restored about as fast as they will decide to tell me to restore the database from a backup. Thanks for your help.

Similar Messages

  • How to restore a single table from a DP Export from a different schema?

    Environment:
    Oracle 11.2.0.3 EE on Solaris
    I was looking at the documentation on DP Import trying to find the correct syntax to import a single table from a DP Export of a different schema.
    So, I want to load table USER1.TABLE1 into USER2.TABLE1 from a DP Export.
    Looking at the REMAP_TABLE options:
    REMAP_TABLE=[schema.]old_tablename[.partition]:new_tablename
    OR
    REMAP_TABLE=[schema.]old_tablename[:partition]:new_tablenameI can't see where to specify the target schema name. The examples had the new table name residing in the same schema with just a new name.
    I looked at the REMAP_SCHEMA but the docs say that will import the entire schema into the new schema and I only want one (1) table.
    Any suggestions are most welcome!
    -gary

    I thought I tried that combination and it seemed to me that the REMAP_SCHEMA somehow over-rode the TABLES= parameter >and started loading all the objects.If it does fail (and it should not) then please post the details here and I will try to see what is happening.
    Let me get back into the sandbox and try it again. I admit I was in a bit of a hurry when I did it the first time.We are all in a hurry, no worries. If it fails, please post the details and the log file.
    Does it make any sense that one parameter would override another?No, this should never happen. We have tons of checks to make sure the job can't have multiple meanings. For example, you can't say
    full=y schemas=foo --- Which do you want, a full export or a list of schema exports, etc.
    Your suggestion was the first thing I thought would work.This should work. If not, please post the log file with the command and the results.
    Dean
    Thanks again for the help and stay tuned for my new attempt.
    -gary

  • Recover a single table using RMAN

    Hi,
    I'm working on an Oracle Database 11g Release 11.1.0.6.0 - 64bit Production With the Real Application Clusters option.
    I did a bad update on a table.
    I have a full backup level 0 before the update
    Is it possibile to recover the single table in an instant before the update using RMAN?
    Thanks in advance.
    Samuel

    Hi Samuel,
    How long ago was the update committed? What's the value of undo_retention?
    If the undo has not yet expired, the easiest way to recovery is through flashback query. (Note that flashback database does not have to be enabled for flashback query to work.)
    See MOS Doc ID 238674.1.
    If that's not a possibility, and flashback database is not enabled, the only other option is to do an out-of-place restore, of SYSTEM, UNDO, and tablespace containing the table you want to recover, and recover to point in time before the update. Then, export table, drop the database, and import table into your primary database.
    Hope that helps,
    -Mark

  • Single table recovery from hotbackup?

    In oracle 9i, accidently one of table has dropped, is it possible to recovery single table from the hotbackup without any downtime, to the user session..

    Hi
    No, you can't make it possible , you have to restore your whole database and perform the incomplete recovery to get your table back.however you can go for tablespace point in time recovery , where you only need to restoter the perticular tablespace datafile , without distrurbing the rest of the operation. hi alok,you should verify ur answer before posting here.because we can use TSPITR for recovery of drop table.
    As per Oracle Documentation
    User-managed TSPITR is most useful for recovering the following:
    An erroneous DROP TABLE or TRUNCATE TABLE operation
    An erroneous DROP TABLESPACE operation
    A table that is logically corrupted
    An incorrect batch job or other DML statement that has affected only a subset of the database
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96572/ostspitr.htm#421341
    Thanks and Regards
    Kuljeet Pal Singh

  • How To Restore Deleted Table With It's Data To Specified Time Using 10g

    Hello Everybody
    I would like to gain from your experience in the Felid of DBA so now i am not trying to restore the full database, but i have a stupid user dropped accedintaly a single table from the database. i want to restore this table after being deleted but also i have big problem i dont have any backup for this table so if you please send to me any solution to restore this deleted table
    Notes : I have (Flash backup On , Archive Log Is On)
    it is not that the database is corrupted or anything
    Ramez S. Swires

    Hey N. Gasparotto
    Thank you for replying me. in the first thread you told me
    ( Without any flashback availability, you haven't any other choice than PITR (Point In Time Recovery)).
    i already checked i found that flashback is working and archive log are working and both are working normally and working before dropping the table and also i cant restore the table which is dropped.
    So what can i do?
    Do you have any other idea?
    Ramez S. Sawires

  • Recover a single table from a complete rman

    Hi
    I need to restore a single table from a complete rman backup, but it seems like this backup is divided into datafiles and this table is allocated together with others.
    I use a library for make backups.
    Does anybody know how can I get this unique table's information from my rman backup?

    Hi
    Which version of Oracle are you using?
    If you are using 9i you must restore the database with another name and dann export/import the needed tables.
    If you are using10g you can try with the SQL-command: FLASHBACK TABLE
    Bye, Aron

  • Why not physical backup be able to restore logical tables ?

    DBA's are used to the perspective of physical & logical backups for a long time .
    I wonder why should it not be able to do a logical restore a single table from a physical backup ? It will be great to have this possibility.
    Is this is design constraint that can be changed by Oracle ?
    -Shekar

    This is not a design constraint.
    The physical backup is of all the physical components of a database which are interpreted by the server software to create the logical representation.
    A physical backup is meant to be restored completely whereas a logical backup can be restored as of requirement.
    It is not desirable to be able to restore a single table from physical backup as table is a logical representation of data. Till such time that the physical data is not interpreted by Server software it is just bytes on the disk.
    So, if we want to restore a table from physical backup we will need a running instance to interpret the data and this will be more time consuming than having it extracted from a logical set.
    If our system has not gone down and we want to restore the table just to a previous state, then (Oracle 10g) we can do it easily without taking the help of physical backups, through flashbacks.
    These are my views, perhaps others can join in and we can discuss this out.

  • Restoring a table

    Hi Guru's,
    It is possible to restore a table (truncated table) from a single backup? I do have a valid full database backup. The backup is done using rman + IBM Tivoli data protection.
    Will restoring the tablespace help??
    David.

    RMAN are physical backups and in order to restore that truncated data you need to do incomplete recovery. But before doing this tell us the version of your oracle database, if you are on 10g then you can use flashback feature to restore the whole data without touching any RMAN backups. Other wise the best option would be to restore the backup on some other box and recover it just before that truncate command and then export the table from that and import into your database.
    Daljit Singh

  • Backup single table partiton question?

    HI we are using oracle 11.2.0.3 on linux platform and was wanting to know if there is a way to backup just a single table partiiton using rman? If so does the database need to be runnnig in archivelog mode in order to do this with the database online?
    This is a database that has one single huge table that is partitioned by day and we are attempting to export out daily partitions using datapump export so that we can arhive them to tape but the disk system we have is not able to keep up and the export of roughly 128gb is taking over 8 hours and is failing beciase the undo is aging out.
    We would like to bypass writing the partitions out to disk and just stream them to tape if at all possible?
    Any help or suggestions are greatly appreciated.
    Thanks.

    HI, thank you for your reply. I have come to this conclusion also that we could move the partition to another tablespace and then backup just that tablespace. One of my problems here is that the database is not in archivelog mode because it was writing out so many archive logs and was causing a perfromance problem on the database because the storage could not keep up.
    This is a database that it's only purpose is this one huge table that is partitioned by day and they are writing about 128gb per day into the partitions. The one table itself is over 10tb at this point in time and we are struggling with how to manage it.
    We got the business to agree that we will only keep 3 months worth of data in the live table and we can archive the rest but the current method we had in place which was a datapump export and then backup the .dmp file to tape.
    That method is no longer working beause the export is taking too long now because of the amount of data that is getting inserted on a daily basis and the export now is running too long and failing because it is taxing the I/O system on the server.
    So thats why we are trying to use rman to write directly to tape.
    The requirement from the businesss is that we may need to restore a partition from as far back as one year and not sure how this can be done if we would need to restore the tablespace from a backup that is almost a year old? I don;t think it is possible without all of the archive logs.
    Any suggestions are welcomed...
    Thanks.

  • Flashback a single table

    Hi there,
    Is it possible to flashback a single table in Oracle, I don't want to have to flashback the whole database to restore a single table, in the event that the data in it deleted.
    Thanks...

    user9101605 wrote:
    in the case of flashback table case (only DML activties),data will be taken from undo tbs right?
    No, flashback logs will be used.
    Sorry, my mistake.
    Flashback Table uses information in the undo tablespace to restore the table
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/flashptr003.htm
    Edited by: Nikolay Ivankin on 07.06.2011 17:19

  • Creation of SAP Query in SQ02 with Single Table With Condition

    Hi All,
    I want to Create SAP Query in SQ02 using single Table MCHA.
    ii) I dont want all entries of MCHA Table I mean , I have to apply some Condition on this Table.
    i.e  Suppose I am having actual data in MCHA table is like this for Material M1.
    Plant    Material   Batch   BatchCreationdate
    P1          M1         B1       20.06.2007
    P2          M1         B1       04.05.2009
    P3          M1         B1       04.05.2009
    But I want the Output of SAP Query is like this:
       Material   Batch   BatchCreationdate
          M1         B1       20.06.2007
    That is irrespective of Plant if Material & Batch are equal ---> 1st record with Lowest date shoud get at the output.
    Please help me How write the code on single table in the SAP Query.
    Thanks,
    Kiran Manyam

    Hi,
    Your query should be like this:
    Select MATNR CHARG HSDAT
    from MCHA
    into table t_mcha
    where matnr = Materlal number from selection screen.
    The structure of t_mcha should contain the fields that you select.
    Then sort the table by date ascending
    Sort t_mcha by HSDAT.
    Hope this solves your problem.
    Thanks,
    Sowmya

  • How to display data from 2 different groups in a single table

    Hi,
    Following is the requirement:
    The XML Content is below
    ListOf_ssAssetMgmtAsset>
    -<ssAssetMgmtAsset>
    <ssAccountName>1-1D09-83031</ssAccountName>
    <ssAccountPrimaryCountry>USA</ssAccountPrimaryCountry>
    <ssAssetNumber>13111027</ssAssetNumber>
    <ssNaiAssetNumber>123</ssNaiAssetNumber>
    <ssNaiGrantNumber>ABC</ssNaiGrantNumber>
    <ssNaiProductType>System Security Software</ssNaiProductType>
    <ssNaiSuperceded>123</ssNaiSuperceded>
    <ssProductDescription>Upgrade extract local DB</ssProductDescription>
    <ssProductName>1-1M5H-296</ssProductName>
    <ssStatus>ABC</ssStatus>
    <ssId>1X-ZY</ssId>
    <ssCreated>01/01/1980</ssCreated>
    <ssUpdated>01/01/1980</ssUpdated>
    <ssCreatedBy>1X-ZY</ssCreatedBy>
    <ssUpdatedBy>1X-ZY</ssUpdatedBy>
    -<ListOf_ssAgreementEntitlement>
    -<ssAgreementEntitlement>
    <ssEntitlementEndDate>16/12/2009</ssEntitlementEndDate>
    <ssEntitlementStartDate>16/11/2009</ssEntitlementStartDate>
    <ssEntitlementType>Services</ssEntitlementType>
    <ssNaiQuantity>2</ssNaiQuantity>
    </ssAgreementEntitlement>
    </ListOf_ssAgreementEntitlement>
    -<ListOf_ssAgreementEntitlement>
    -<ssAgreementEntitlement>
    <ssEntitlementEndDate>10/12/2009</ssEntitlementEndDate>
    <ssEntitlementStartDate>10/11/2009</ssEntitlementStartDate>
    <ssEntitlementType>ServicePortal</ssEntitlementType>
    <ssNaiQuantity>1</ssNaiQuantity>
    </ssAgreementEntitlement>
    </ListOf_ssAgreementEntitlement>
    </ssAssetMgmtAsset>
    </ListOf_ssAssetMgmtAsset>
    The data needs to be displayed in the below manner where first grouping is by Account Country, then by Account Name. Then the table with 9 columns where in the first 5 columns are from first group and the next 4 are from second group.
    Account Country
    Account Name
         ProductType     Grant #     Asset #     Product SKU Product Name Entitlement Type Quantity /Nodes     EntitlementStart Date     Entitlement EndDate
    I have the coding as
    first for loop: <?for-each-group:ssAssetMgmtAsset;./ssAccountPrimaryCountry?>
    second for loop: <?for-each-group:current-group();./ssAccountName?>
    third which is for the table : <?for-each:current-group()?>
    I close the above grp after product description.
    One table with the first 5 columns and below second table is placed adjacent to the first to display the 4 columns with the grp <?for-each:ssAgreementEntitlement?>
    how do I get all the 9 columns in a single row in a single table.
    Any help is appreciated.
    thanks

    What is the lnk between the two
    ssAssetMgmtAsset and ssAgreementEntitlement ?
    you want to display all the ssAgreementEntitlement for every ssAssetMgmtAsset group ?
    there shud be a link between them, you have link them and display.

  • Why do we create multiple aliases to a single table?

    <h4>{color:#0000ff}Hi,{color}</h4>
    <h4></h4>
    <h4></h4>
    <h4>{color:#0000ff} Why do we create multiple aliases to a single table in the same query?{color}</h4>
    <h4></h4>
    <h4></h4>
    <h4>{color:#0000ff}{color:#000000}For Ex: {color}{color}</h4>
    <h4>
    {color:#000000}select name,address,phone, from emp e, emp e1{color}</h4>
    <h4></h4>
    <h4>{color:#000000}where e.empid = e1.empid;{color}</h4>
    <h4>
    {color:#0000ff}ofcourse the above query's where condition is not correct, but i am giving as an example only{color}</h4>
    <h4>{color:#0000ff}I have seen similar kind of queries where a single table name is aliased 10 times in the same query{color}</h4>
    <h4>{color:#0000ff}can someone help me to understand the logic behind it?{color}</h4>
    <h4>{color:#0000ff}Thanks in advance{color}</h4>
    <h4>{color:#0000ff}greddy.{color}</h4>
    Edited by: greddy on Oct 24, 2008 2:46 AM

    Hi,
    When you say
    FROM    emp  e
    ,       emp  e1you are using two copies of the same table.
    Can you imagine using two copies of the same book at the same time?
    Say you see a word (like "hyrax") that you don't know. You might look up that word in the dictionary.
    The English sentence "Open the dictionary to the page containing the new word." is like this SQL query:
    FROM    dictionary
    WHERE   :unknown_word  BETWEEN low_guide_word and high_guide_wordWhat if you saw that word while reading a book (let's call it book_a).
    You might want to leave book_a open, and place the dictionary beside book_a, so you can easily compare how the word is used in book_a with the definition in the dictionary.
    This corresponds to joining two tables in SQL:
    FROM    book_a     
    JOIN    dictionary  ON unknown_word BETWEEN low_guide_word AND high_guide_word
    WHERE   book_a.page  = whatever  -- NOTE: both tables have a column called pageor you can use aliases for one or both of the tables
    FROM    book_a      a
    JOIN    dictionary  d  ON a.unknown_word BETWEEN d.low_guide_word AND d.high_guide_word
    WHERE   a.page  = whatever  -- NOTE: both tables have a column called pageNow, imagine that book_a is itself the dictionary. Say you saw the word "hyrax" while you were looking up another word, "ibex".
    You can do a side-by-side comparison, as above, if you have two copies of the dictionary. Leave one copy open to "ibex", and open the other copy to "hyrax".
    This corresponds to a self-join in SQL:
    FROM    dictionary  a
    JOIN    dictionary  d  ON a.unknown_word BETWEEN d.low_guide_word AND d.high_guide_word
    WHERE   a.page  = whatever  -- NOTE: both tables have a column called pageNotice that this last bit of code is identical to the previous one, except that book_a is replaced with dictionary.
    In this case, you must you a table alias, at least for one copy. It wouldn't make any sense to say "Leave the dictionary open to "ibex" and open the dictionary to "hyrax". You have to have some unique way of referring to each copy, such as "Leave the dictionary on my left open to "ibex" and open the dictionary on my right to "hyrax"."

  • Multiple clob fields in a single table

    Are there any known performance issues associated with having 4 CLOB fields in a single table... the table as such will be relatively small.. like 100 MB... with most rows being << 50k.

    Not really. If you need 4 CLOB columns and it makes sense to have alll the columns in a single table, go for it.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Two Fields in a Single Table

    Hello All,
    I'm a newbie to the forum & to Crystal(9), I've searched the forum and ca't exactly find an answer to my question:
    My goal is to be able to pull the Company Member Type & the Contact Member Type as part of the same report in the selection criteria.
    My problem is: They both reside in the same table...
    The question is: "how to be able to pull the info?"
    If I need to provide more or clearer info pleasde let me know.  Any help is appreciated.
    Lost in DC - DJ

    If you have a single table datasource record duplication wouldn't be a result of the select expert. In fact, I can't think of a case where a single table datasource could possibly duplicate records.
    The duplicates must be the result of a join.
    To answer your initial question, the select expert you enter is subjected, in its entirety, to each record in the joined tables.
    The problem that I see with the above suggestion relates to precedence.
    This:
    cond 1 AND cond 2 AND cond 3 OR cond 4
    Is not this:
    cond 1 AND cond 2 AND (cond 3 OR cond 4)
    In the case of the non-paren-ed select statement, it will return records that satisfy ALL of the AND conditions OR just the or condition.
    In the second case, it will return all records that satisfy condition 1 and condition 2 AND either condition 3 or condition 4.
    Try bracketing the ored conditions from the same table. That should solve your select problem, but not the duplication problem.

Maybe you are looking for

  • Restore default fonts in windows 8.1

    Hi, I want restore all default fonts in windows 8.1. What i do?

  • How to add Airport Time Capsule to an existing AT&T U-Verse Network?

    Hello, and please bear with me as I am not very tech savvy I just purchased a 2TB Airport Time Capsule (5th Gen) because I'd like to backup my Macbook Pro wirelessly. I've tried customer service with my ISP without luck, AT&T U-Verse. I currently con

  • Oracle.exe taking high memory

    Hello,I got an error Ora-04030:-ORA-04030: out of process memory when trying to allocate 3842688 bytes (session heap,kgich) on oracle 11gr2 On windows 8. My ram is of 16gb sga_max_size =8g Pga_aggregate_target=1.5g Oracle.exe goes upto 15gb. how it i

  • Why is my eyedropper missing from my InDesign CS6 toolbar?

    I have searched and searched, and can't find it anywhere.  If has disappeared from my Toolbar, is there some way to restore it?  Another place I can find it?  I'm operating Yosemite on a new (within the past year) iMac. Thank you! --BILL

  • IDVD vs DVD Pro

    I posted this question on FCX forum but maybe its more appropriate here. I bought FCX for $99, upgraded to FCX HD for $99 because it came with Soundtrack and then spent another $99 to upgrade to Soundtrack Pro. Because I own Soundtrack Pro it looks t