Restore a single table

I have accidentally truncated a table for the evil scheme and I need to recover the data. I know that this is not an easy task with rman, but I'm looking for tips for the best method.

I'm under Oracle Standard Edition 11.1.0.6.0 on Linux. A cold backup of this database is created each week with rman. It is not in archivelog mode, because it would generate too many log files and all changes are easy enough to reproduce. The only method I know is to restore the entire database on another machine, and then export the table data / of the restored database and import it into the truncated table. It will take some time (a few or several days) and seems to contain a lot of unnecessary work for computers involved. The table was only a few 100 MB, and the DB is 1 TB +.

Is it possible to restore the entire table with the table truncated on a new server? Is - it somehow possible in another instance of the database on the same computer? If I can restore a tablespace, but do it on another computer, I do not have to transfer the backup rman together on the new server? Y at - it something like the return of flame that will help me on Oracle Standard Edition? Are there any other suggestions for the restoration of a table more quickly?

Yes, you can perform a manual SYSTEM restore + CANCEL + the Tablespaces Tablespace_containing_that_table only.
You would have to set all the other offline data files.

It would be safer to do it on another server - which means that you must copy the backup (or at least all backupsets that contain these storage spaces).

To try to do it on the same server, you need to change the DBID and DB_NAME of the 'clone' before even that you OPEN. That means using the DBNEWID (nest)-, but who would be expected to update all data since the controlfile files (unless you try this with having dropped offline for all data files).

However, if you install a new Oracle_Home and use that Oracle_Home, you can configure an init.ora file. Then, use RMAN to CATALOG the backupsets. Then RESTORE only the data of the selected Tablespaces (SYSTEM + CANCEL + RequiredTBS) files. Make sure that you use the VALUE of NEWNAME for the data files so that restoration does not overwrite your production database! _ then OPEN database RESETLOGS. (Note: do not use the RECOVER command). You could also new nest to rename this database.

Then export the table outside.

And import it into your production database.

Hemant K Collette
http://hemantoracledba.blogspot.com

Published by: Hemant K grapple on March 10, 2010 14:10

Tags: Database

Similar Questions

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

    Environment:

    Oracle 11.2.0.3 EE on Solaris

    I was looking at documentation when importing DP trying to find the correct syntax to import a single table of an RFP to a different schema export.

    So I want to load the table User1. Table1 in USER2. Table1 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_tablename
    I can't see where to specify the name of the target schema. Examples were the new table name residing in the same pattern with just a new name.

    I looked at the REMAP_SCHEMA but the docs say matter the entire schema in the new schema and I want only one 1 table.

    All suggestions are welcome!

    -gary

    I thought I tried this combination and it seemed to me that the REMAP_SCHEMA somehow too rolled TABLES = parameter > and started to load all the objects.

    If it does not fail (and it shouldn't) then please post details here and I'll see what happens.

    Let me back in the tray to sand and try again. I admit I was a bit of a rush when I did the first time.

    We are all in a hurry, no worries. If it fails, please post the details and the log file.

    Does make any sense that a parameter would be substitute another?

    No, this should never happen. We have tons of audits to ensure that labour cannot have several meanings. For example, you can not say

    Full schemas = y = foo - what you want, or a full export list export schema, etc.

    Your suggestion was the first thing that I thought would work.

    It should work. If this isn't the case, send the log with the command and the results file.

    Dean
    Thanks again for the help and stay tuned for my new attempt.

    -gary

  • after image restore, backup partition table is different

    Hello

    He is a 2012 Macbook mid Pro with El Capitan and Bootcamp.

    After repeated with Bootcamp (Windows 10 Pro) problems I started using Image of Terabyte for Linux in order to safeguard this Macbook. Forums terabyte that people know that the Image of Linux (such as Image for Windows) is able to create a reliable backup, but also to restore - restore an entire disk image or restoring individual partitions.

    I followed their instructions precisely and activated the two options "restore first Beach" and "TPG hidden OS" (as one terabyte official, Member of the forum wrote) when restoring a partition.

    Unfortunately, it did not work! Bootcamp was no longer visible in the start screen or wasn't visible, but not start.

    What I found was that I had to keep the two options (see above) with DISABILITIES.

    Then I could restore some partition images - and 10 Windows in Bootcamp is bootable.

    Well, it was the long introduction.  I'm sorry.

    Now my question is:

    Is this something that has changed my partition table?

    Before restoring an Image for backup of Linux for the first time, I had this partition table:

    localhost: ~ root # fdisk/dev/disk0

    Disk: geometry / dev/disk0: 60801/255/63 [976773168 sectors]

    Signature: 0xAA55

    From end

    #: cyl hd s - cyl hd s id [Start - size]

    ------------------------------------------------------------------------

    1: EA 1023 254 63 - 1023 254 63 [1-409639]

    2: AF 1023 254 63 - 1023 254 63 [409640-857906448] HFS +.

    3: AB 1023 254 63 - 1023 254 63 Boot Darwin [858316088-1269536]

    * 04:07 1023 254 63-1023 254 63 [859586560-117186560] HPFS/QNX / TO THE

    BUT:

    After failed attempts to restore and work finally restore my partition table operation is different:

    Fdisk/dev/disk0

    Disk: geometry / dev/disk0: 60801/255/63 [976773168 sectors]

    Signature: 0xAA55

    From end

    #: cyl hd s - cyl hd s id [Start - size]

    ------------------------------------------------------------------------

    1: EA 0 0 2 - 1023 255 63 [1-409639]

    2: AF 25 102 15 - 1023 255 63 [409640-857906448] HFS +.

    3: AB 1023 0 57 - 1023 255 63 Boot Darwin [858316088-1269536]

    * 04:07 1023 199 8-1023 255 63 [859586560-117186560] HPFS/QNX / TO THE

    Everything seems to work fine, but I wonder if the different appearance of the partition table can be a problem?

    For example, compare:

    1: EA 1023 254 63 - 1023 254 63] 3 o 409639]

    TO

    1: EA 0 0 2 - 1023 255 [63 3 o

    409639]

    It's the output of 'diskutil list ':

    localhost: ~ root # diskutil list

    / dev/disk0 (internal, physical):

    #: NAME SIZE TYPE IDENTIFIER

    0: GUID_partition_scheme * GB 500,1 disk0

    1: disk0s1 EFI EFI 209.7 MB

    2: Apple_HFS Macintosh HD 439,2 GB disk0s2

    3: disk0s3 Apple_Boot Recovery 650.0 MB HD

    4: Microsoft database BOOTCAMP 60.0 GB disk0s4

    And the output of 'TPG - r - vv show/dev/disk0':

    See the TPG: / dev/disk0: mediasize = 500107862016; SectorSize = 512; blocks = 976773168

    See the TPG: / dev/disk0: MBR suspicious to sector 0

    See the TPG: / dev/disk0: Pri GPT to sector 1

    See the TPG: / dev/disk0: GPT Sec at sector 976773167

    start index size summary

    0 1 MBR

    1 1 Pri GPT header

    2 32 table GPT Pri

    34 6

    40 409600 1 part TPG - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

    409640 857906448 2 part TPG - 48465300-0000-11AA-AA11-00306543ECAC

    858316088 1269536 3 part TPG - 426F6F74-0000-11AA-AA11-00306543ECAC

    859585624 936

    859586560 117186560 4 part TPG - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

    976773120 15

    976773135 32 table dry GPT

    976773167 1 dry GPT header

    Out of 'gdisk/dev/disk0:

    localhost: ~ root # gdisk/dev/disk0

    GPT fdisk (gdisk) version 1.0.1

    WARNING: Open with shared lock devices will not have their

    table partition automatically reloaded!

    Scanning partition table:

    MBR: hybrid

    BSD: absent

    APM: absent

    TPG: present

    Found a valid GPT with hybrid MBR; using GPT.

    Command (? for help): p

    Disk/dev/disk0: 976773168 sectors, GiB 465.8

    Logical sector size: 512 bytes

    Identifier (GUID) of disc: 38A2E667-6E00-4C0F-BD78-C95979E3CFAE

    Partition table contains up to 128 entries

    First usable sector is 34, last usable area is 976773134

    The partitions will be aligned with the boundaries of sector 8

    Space is free total 957 sectors (478,5 KiB)

    Starting number (sector) end (sector), Code name of size

    409639 40 1 MiB EF00 EFI 200.0

    2 409640 858316087 409.1 giB AF00 Macintosh HD

    3 858316088 859585623 619.9 MiB AB00 Recovery HD

    4 859586560 976773119 55.9 giB 0700 BOOTCAMP

    Any ideas?

    Another question:

    Is it possible to save the table to partition like that?

    DD if = / dev/sda of = gptandmbr bs = 512 count = 34

    Thank you very much

    NEUMAC

    In Fdisk, the CHS numbers are arbitrary on modern disks. They are the time of BIOS and old disks with CHS geometry. Puts BCA from Mac 0-1023 (1024 cylinders), 0-255 (256 heads) and 0-63 (64 sectors). Modern disks far exceed those numbers and would drain them. Must match what is the triplet of start/end/size and it fits in GPT and MBR. You can put arbitrary 0,0,0 for CHS and you will see all issues on GPT disks.

    Please do not use TBIL to restore W10 to circa 1970-80 disks.

  • How to restore a single application?

    Is there any way to restore a single application from my old to my new iPad? Everything except this one game out my windows7 PC okay, but a game with three levels empty load on the new ipad. Any help is appreciated.

    You can explore around with iExplorer and see if you could see inside the app.

    https://www.macroplant.com/Iexplorer/

  • Is there a way to restore a SINGLE FILE in a folder deleted from the Recycle Bin?

    Suppose that you remove all the contents of a folder that contains the files and subfolders. If you open the Recycle Bin, you can see a list of deleted files and subfolders, but there is no way to see the files in the subfolders. So, if you want to restore ONLY a single file in a subfolder of the deleted, it seems there is no way to do it. You can only restore the entire sub.folder, which is not necessarily what you want, especially if you filled out the application parent with other files and subfolders after the deletion.

    Is there a way to restore a SINGLE FILE in a folder deleted from the Recycle Bin?

    Another method would be to drag the folder to the Recycle Bin on your desktop. Open it and recover the files required - re - delete the folder.

    @ Palcouk... you can actually retrieve files deleted, even when they are home to recycle the locker to restore a previous version of the folder parent; These come available restore points so not always guaranteed, but he made the most of the time if action is taken quickly enough. :) Ric

  • does anyone know how to restore a single file (my windows 8 buy, reception with my product codes) backup

    does anyone know how to restore a single file (my windows 8 buy, reception with my product codes) backup any help would be appreciated

    LC

    If you do not have access to windows and you used the built in backup, you will have a problem.  There is a way pretty cludgy to get home if you know where it is.  You can download Acronis true image home and convert the backup Windows a one acronis > find the file > convert a windows backup.  Not pretty but doable

  • Dreamweaver several graphs in single table cell

    Dreamweaver is having problems when I try to combine multiple charts in a single table cell. Some are separated by two end just "" entries, while others do not accept these separators. Pleas you show me the right way to handle this.

    Jack,

    • Tables should not be used for web page layouts.
    • Tables for tabular data such as spreadsheets and graphics only.
    • Today, we use an external CSS file for the layout, typography and other styles.

    Please show us what you are trying to do by copying and sticky code in a reply from the web forum.

    Nancy O.

  • How to restore a backup table table

    I used this sql to backup my fnd_table:

    create the table fnd_concurrent_queues_backup as (select * from fnd_concurrent_queues);


    I changed some things in this table for diagnostic purposes with my concurrent managers, now I need to restore my original table, I think that would be OK, but I'm not 100% sure that I never had to restore the table. Please help me to check it out.


    ALTER table fnd_concurrent_queues as (select * from fnd_concurrent_queues_backup);


    Is this correct or is there another way to restore this table?


    Thank you

    You can simply back up the existing table and then rename the backup name origin- http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9019.htm table

    Thank you

    Hussein

  • Restore a single file from a backup of VDP VM

    Hi all

    I have a question on vSphere for Data Protection. We installed this product a couple of days and I hope that this will help us reduce costs from Symantec Backup Exec. I read somewhere that you can restore a single or multiple file from a backup of POS. I've been clicking on my way in the restore option but I can't find this option anywhere. Does anyone have experience with this?

    Thank you

    André

    Firstly, you need a VM, which has been saved at least once. On this virtual machine, you can open an Explorer with https://'IP-of_your_VDP-appliance': 8543/flr /.

    As you click on "Advanced Login"

    Powers the: a user who has access to this virtual machine

    vCenter credentials: only that user, that you used to configure your POS with /vdp - configure. (Nested user does not work)

    After login you can restore files from all virtual machines of your backup-store in this virtual machine.

    If you use Internet Explorer and only see a blue screen, can you try to click on the button "compatibility view".

    For the restoration of level in Linux, you need a Linux VM with an Explorer.

    There is a limit of maximum 5000 files by restore.

    Paul

  • single table hash clusters

    I created a hash cluster single table like this:

    create tablespace mssm datafile 'c:\app\mssm01.dbf' size 100 m
    Segment space management manual;


    create the cluster hash_cluster_4k
    (id number (2))
    size 8192 single hash table is id hashkeys 4 tablespace mssm;

    --Also created a table cluster with the line size such as single record corresponds to a block and inserted 5 records each with a separate key value


    CREATE TABLE hash_cluster_tab_8k
    (number (2) id,)
    txt1 tank (2000).
    txt2 tank (2000).
    tank (2000) txt3
    )
    CLUSTER hash_cluster_8k (id);


    Begin
    because loop me in 1.5
    Insert in the values of hash_cluster_tab_8k (i, 'x', 'x', 'x');
    end loop;
    end;
    /
    exec dbms_stats.gather_table_stats (WATERFALL of the USER 'HASH_CLUSTER_TAB_8K' = > true);


    Now, if I try to access the folder with id = 1 - it shows 2 I / O (cr = 2) instead of the single e/s as provided in a hash cluster.



    Rows Row Source operation
    ------- ---------------------------------------------------
    1 ACCESS HASH_CLUSTER_TAB_8K HASH TABLE (cr = 2 pr = 0 pw = time 0 = 0 US)


    If I run the query, even after the creation of a unique index on hash_cluster_tab (id), the execution plan specifies access hash and single e/s (cr = 1).

    This means that for a single e/s in a single table hash cluster, we create a unique index? It will not create an additional burden to maintain an index?

    What is the second I/o necessary for in the case where a unique index is absent?

    I would be very grateful if gurus could explain this behavior.

    Thanks in advance...

    user12288492 wrote:
    I ran the query with all 5 id values and the results have been more confusing.

    During the first inning, I had VC = 2 for two values of keys, the Czech Republic rest = 1
    During the second inning, I = 2 for a key value, the Czech Republic cr rest = 1
    In the third set, I had VC = 1 for all values of keys

    The effects vary depending on the number of previous runs and the number of times you reconnect.
    The extra CR is a cleansing of the block effect. If you check the access of the buffer (events 10200-10203), then you can see the details. Simplistically, if you create your data, then connect and interrogate one of the lines (but not id = 5, because that will be cleaned on the collection of statistics) you should be able to see the following numbers:

    cleanouts only - consistent read gets                                        1
    immediate (CR) block cleanout applications                                   1
    commit txn count during cleanout                                             1
    cleanout - number of ktugct calls                                            1
    Commit SCN cached                                                            1
    redo entries                                                                 1
    redo size                                                                   80
    

    On the first block visited, Oracle made a visit to buffer to untangle a YVERT cleaning (ktugct - get the commit time). This cleans up the block and caches the acquired RCS. The rest of the blocks that visit you in the same session should not be cleaned because the session can use the updated SNA caching to avoid needing a cleanup operation. Finally all the blocks will have been cleaned up (which means that they will be written to the disk) and the extra CR stops happening.

    There is a little quirk - drain plug seems to apply to the format block calls - and I do not understand why this was did not each row inserted thereafter.

    Concerning
    Jonathan Lewis

  • multiple to single table replication

    Hello

    Is there a way we can replicate multiple tables at source on a single table to the target.

    example: join table A and B on the source and put it in the table C.

    Thank you!

    Yes it is possible. OGG can be used to get the data from the tables of the source and go in a single target table. But keep in mind if you are data fusion then PK conflict should be avoided otherwise, you can get any data problems.

    -Koko

  • Repetition of groups nested in a single table - model RTF

    Hi all

    I have a little problem with RTF models. I try to use 2 recurring groups within a single table, but everything I'm not get data for the fields of the outer loop, or still getting only one record of the loop internal.

    It is a model of report of cash requirements. My expandable outside group is G_VENDOR and internal is G_INVOICE. I'm at the stage where I pasted the table with the G_INVOICE details in another table (with the NAME of the SELLER in the first field). This has however a drawback - it is not to repeat the name of the seller if there is more than one G_INVOICE in G_VENDOR. I don't want tables repeated for each provider, one with all the data.

    I had SR Oracle open, but they seem not to be very useful, makes me think it is a bug and not fixed will never be. I know that the XML flatenning would be an option, but I don't want be to redevelop all alone I need template for reports.

    Someone has an idea?

    Concerning
    Piotr

    Hi Piotr,

    Ideally you would be that flatten, but if you are inside the loop of invoice you can still access the fields of the outer loop by changing the form field and by prefixing with... /.

    for example becomes

    Kind regards

    Robert

  • restore the 2 tables FND_USER and FND_ORACLE_USERID

    Just practing fndcpass, took the backup of these tables, create the table in select fnd_backup * to fnd_ *, I was wondering what is the trunk command to restore these 2 tables.

    I just changed apps, sysadmin, & alloracle pw, I want just convenient if these are up... messed up somehow update the lines for these users only?

    Just practing fndcpass, took the backup of these tables, create the table in select fnd_backup * to fnd_ *, I was wondering what is the trunk command to restore these 2 tables.

    You need to save the two tables, FND_USER and FND_ORACLE_USERID.

    To restore, just rename tables (rename FND_USER_BACKUP in FND_USER and FND_ORACLE_USERID_BACKUP to FND_ORACLE_USERID after you rename the tables updated to FND_USER and FND_ORACLE_USERID).

    FNDCPASS. Troubleshooting Guide to connect and change the passwords of Applications [ID 1306938.1]

    I just changed apps, sysadmin, & alloracle pw, I want just convenient if these are up... messed up somehow update the lines for these users only?

    Direct update is not supported, so you'll need to restore the backup of the tables or reuse FNDCPASS to change the password back.

    Thank you
    Hussein

  • How to combine the large number of tables of pair key / value in a single table?

    I have a pair key / value tables of 250 + with the following features

    (1) keys are unique within a table but may or may not be unique in the set of tables
    (2) each table has about 2 million lines

    What is the best way to create a single table with all unique key-values of all these paintings? The following two queries work up to about 150 + tables
    with
      t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select coalesce(t1.key, t2.key, t3.key) as key
    ,      max(t1.val) as val1
    ,      max(t2.val) as val2
    ,      max(t3.val) as val3
    from t1
    full join t2 on ( t1.key = t2.key )
    full join t3 on ( t2.key = t3.key )
    group by coalesce(t1.key, t2.key, t3.key)
    /
    
    with
      master as ( select rownum as key from dual connect by level <= 5 )
    , t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select m.key as key
    ,      t1.val as val1
    ,      t2.val as val2
    ,      t3.val as val3
    from master m
    left join t1 on ( t1.key = m.key )
    left join t2 on ( t2.key = m.key )
    left join t3 on ( t3.key = m.key )
    /

    A couple of questions, then a possible solution.

    Why the hell you have 250 + tables pair key / value?

    Why the hell you want to group them in a table containing one row per key?

    You could do a pivot of all the tables, not part. something like:

    with
      t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select key, max(t1val), max(t2val), max(t3val)
    FROM (select key, val t1val, null t2val, null t3val
          from t1
          union all
          select key, null, val, null
          from t2
          union all
          select key, null, null, val
          from t3)
    group by key
    

    If you can do it in a single query, Union all 250 + tables, you don't need to worry about chaining or migration. It may be necessary to do this in a few passes, depending on the resources available on your server. If so, I would be inclined to first create the table, with a larger than normal free percent, making the first game as a right inset and other pass or past as a merger.

    Another solution might be to use the approach above, but limit the range of keys with each pass. So pass we would have a like predicate when the key between 1 and 10 in every branch of the union, pass 2 would have key between 11 and 20, etc. In this way, everything would be straight inserts.

    That said, I'm going back to my second question above, why the hell you want or need to do that? What is the company you want to solve. There could be a much better way to meet the requirement.

    John

  • Fusion of single table

    Hi all

    I am using the command merge onto a single table. I want to check some values in the table, if they already exist I just update, thing that I want to insert.

    For this I use the following code:



    MERGE INTO my_table OLD_VAL
    NEW_VAL in ASSISTANCE from (SELECT L_field1, L_field2, L_field3, DOUBLE L_field4)
    WE (OLD_VAL.field1 = NEW_VAL. L_field1
    AND OLD_VAL.field2 = NEW_VAL. L_field2
    AND OLD_VAL.field3 = NEW_VAL. L_field3
    )
    WHEN MATCHED THEN
    UPDATE SET OLD_VAL.field4 = NEW_VAL. L_field4
    WHEN NOT MATCHED THEN
    INSERT (Field1, Field2, field3, field4, sphere5)
    VALUES (NEW_VAL. L_field1, NEW_VAL. L_field2, NEW_VAL. L_field3, NEW_VAL. L_field4, SYSDATE);

    Fields starting with L_ here is my local variables inside my procedure.

    It is giving error as ORA-00904: "NEW_VAL. "" L_field3 ": invalid identifier

    Thank you all.

    SELECT L_field1, L_field2, L_field3, DOUBLE L_field4

    1. you r select all values here?
    2. try to give alias for all columns

Maybe you are looking for

  • HP Pavilion G6 2320se Audio driver Help!

    Would like to bring to HP noted that the driver for the above mentioned model is not correct. Selected audio when driver for Win7 64 bit shows only 5.8 MB. Even the controller LAN driver is the same size. When I extracted the audio driver it has prov

  • the NTI in storage of persistence storage

    I have choice of object field and I store the index of the selected value in the persistent store but when I try to retrieve the value from persistent I'm classcastExccption String SELECTEDINDEXValue = Integer.toString(pickFont.getSelectedIndex()); s

  • GPS icon missing BlackBerry Smartphones

    I had just bought a BB 9000 "BOLD" and I got Vodaphone UK as a service provider.  My question to all, is that when I look at the menu, I don't have the GPS icon everyone takes to run BB Maps.  I looked in several websites, but I have not found the "r

  • Can we do update content continues with licensed "professional"?

    HelloLooking to launch a magazine (NOT on newsstands) app to a customer which includes a continuous section, probably every two days, the items updated.  Is this something I could do with licensed "professional"?  Or is it something which is not feas

  • Brush sensitivity Flash help.

    In flash CC, my brush with no rendering problem, but when I put on the pressure sensitivity, he all of a sudden will not display my favorites until I did race