Single table recovery

Is it possible to recover a single table in oracle instead of the entire database?
We lost all of our data in just one table by mistake.
Please let me know..

user517674 wrote:
We will have to go back atleast 3 or 4 days to recover. Wehn I run it for timestamp - 4 I get:
ORA-01555: snapshot too old: rollback segment number 33 with name "_SYSSMU33$" too small
IS there any other option available?Was it that the rows were deleted or was the table dropped?
If it was dropped, you may (if you're lucky) stand a chance of getting it back with flashback...
SQL> select * from t1;
         X          Y
         1         11
         2         12
         3         13
         4         14
         5         15
         6         16
         7         17
         8         18
         9         19
        10         20
10 rows selected.
SQL> drop table t1;
Table dropped.
SQL> select * from t1;
select * from t1
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> flashback table t1 to before drop;
Flashback complete.
SQL> select * from t1;
         X          Y
         1         11
         2         12
         3         13
         4         14
         5         15
         6         16
         7         17
         8         18
         9         19
        10         20
10 rows selected.
SQL>

Similar Messages

  • 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

  • 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

  • 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

  • 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

  • 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.

  • How will check the space taken by a single table in a tablespace ?

    How will check the space taken by a single table in a tablespace ?
    dba_segments is giving the same values even if I truncate the table?
    Pls reply

    I need to know how can we find out the size of the table in the tablespace.use user_segments (bytes) column.
    How much bytes it has taken ?value from user_segments, bytes column
    If u delete records will the space be used for another table in same tablespace?No, it keep the space in the same table for future usage.
    How can we free that space ?truncate or drop the table and reduce the size from tablespace, if you want to reclaim the space from the tablespace, OS level.
    Jaffar

  • Adding a single table without a logical join to another table (OBIEE 10g)

    Sometimes I want to just display a single table without a logical join to another table in the repository. However, everytime I move it to the Business Model and Mapping layer and perform a Global Consistency Check, it tells me that it needs a logical join and I am forced to create another table to join to it. Thus creating a dimension-fact relationship. There are times I don't need this relationship and just want to display some data. Is there anyway to get around this?
    Thanks in advance!

    Yes,You have to create a join.You cannot take single table to BMM layer.You can create an alias of the table.Join this alias and base table through any common column and take both tables to BMM and desired table to presentation layer.
    Another way is to create a view in physcial layer.Write a select statement like
    Select primary_key from Table
    Where primary_key is primary key of base table.Join this view ith base table and repeat the steps defined for Alias.
    Regards,
    Sandeep

  • How to get the data from multiple tabes into single table

    hi all,
    here i am having 10 data base tables,how to get the data into a single table.
    regards,
    subba reddy

    hi,
    non XI/PI related
    Regards,
    Michal Krawczyk

  • Creation of view on single table?

    Hi Team,
    I have a requirement like for creaation of view on single table (QMEL) in SAP ECC side...
    Note: in this table i need 2o fields only....not all fields.
    First can we create view on single table?
    if  'Yes' can any one tell , How we can creat view on single table?
    While creation of view we have four options..
    1)Data base view
    2)Projection View
    3)Maintanace view
    4)Help view
    in these four options which tyep of view we can choose for creation?
    please can any one suggest me and do the need full..
    i am waiting your responce...

    I quickly skimmed the links provided by others; and in my short discussions with DBA friend of mine; and other sources... partition should be based on user needs, sql server resources, and partition maintenance time.
    Lets say you have 50 regions and 1) partition the data by region, AND 2) place each partition on a different disk, and 3) i am in Texas and only query data in the Texas region then performance will be increased because I am not scanning through the other
    49 regions.
    If you have temporal data (dependent on time - like say financial reports that are sent to the SEC) - the partitions are by time: 1) data from last 13 months is stored on SSD, 2) data 13 months - 3 years old is on HDD, and 3) data >3 years old is stored
    on compressed HDD.  (i say 13 months so you have an entire year and month to date)  --- accountants can get the current data VERY quickly, project managers who need to see a 3 year trend will not have to wait long, and when the SEC calls, who cares?,
    the reports can be queued and generated at night when no one is working. 
    I see partitions are giving the users the least amount of data to query which speeds their results.

  • Single table hash clusters

    I created a single table hash cluster like this :
    create tablespace mssm datafile 'c:\app\mssm01.dbf' size 100m
    segment space management manual;
    create cluster hash_cluster_4k
    ( id number(2) )
    size 8192 single table hash is id hashkeys 4 tablespace mssm;
    -- Created a table in cluster with row size such that only one record fits one block and inserted 5 records each with a distinct key value
    CREATE TABLE hash_cluster_tab_8k
    ( id number(2) ,
    txt1 char(2000),
    txt2 char(2000),
    txt3 char(2000)
    CLUSTER hash_cluster_8k( id );
    Begin
    for i in 1..5 loop
    insert into hash_cluster_tab_8k values (i, 'x', 'x', 'x');
    end loop;
    end;
    exec dbms_stats.gather_table_stats(USER, 'HASH_CLUSTER_TAB_8K', CASCADE=>true);
    Now, If I try to access record with id = 1 - It shows 2 I/O's (cr = 2) instead of single I/O as is expected in a hash cluster.
    Rows Row Source Operation
    1 TABLE ACCESS HASH HASH_CLUSTER_TAB_8K (cr=2 pr=0 pw=0 time=0 us)
    If I issue the same query after creating unique index on hash_cluster_tab(id), the execution plan shows hash access and single I/O (cr = 1).
    Does it mean that to have single I/o in a single table hash cluster, we have to create unique index? Won't it create additional overhead of maintaining an index?
    What is the second I/O needed for in case unique index is absent?
    I would be extremely thankful if gurus could explain this behaviour .
    Thanks in advance ..

    >
    Now, If I try to access record with id = 1 - It shows 2 I/O's (cr = 2) instead of single I/O as is expected in a hash cluster.
    1 TABLE ACCESS HASH HASH_CLUSTER_TAB_8K (cr=2 pr=0 pw=0 time=0 us)
    >
    As expected? Have you considered that your 'expectation' is wrong?
    >
    If I issue the same query after creating unique index on hash_cluster_tab(id), the execution plan shows hash access and single I/O (cr = 1).
    Does it mean that to have single I/o in a single table hash cluster, we have to create unique index? Won't it create additional overhead of maintaining an index?
    What is the second I/O needed for in case unique index is absent?
    >
    My hypothesis would be that are seeing the effects of having a 'hash collision'; a collision that you caused yourself by the way you defined the table.
    Remember when you said this?
    >
    create cluster hash_cluster_4k
    ( id number(2) )
    size 8192 single table hash is id hashkeys 4 tablespace mssm;
    >
    You told Oracle there will only be FOUR different IDs used.
    And then you said this
    >
    -- Created a table in cluster with row size such that only one record fits one block and inserted 5 records each with a distinct key value
    >
    You used FIVE different IDs and only ONE record will fit into each block.
    So that record with 'ID=5' is guaranteed to HASH to one of the existing four hash values. And that means you have a 'hash collision'.
    The docs explain what happens when you have a 'hash collision'. See the 'Hash Cluster Storage' section in the Database Concepts doc
    http://docs.oracle.com/cd/E11882_01/server.112/e25789/tablecls.htm#sthref258
    >
    Hash Cluster Storage
    Oracle Database allocates space for a hash cluster differently from an indexed cluster. In Example 2-9, HASHKEYS specifies the number of departments likely to exist, whereas SIZE specifies the size of the data associated with each department. The database computes a storage space value based on the following formula:
    HASHKEYS * SIZE / database_block_size
    Thus, if the block size is 4096 bytes in Example 2-9, then the database allocates at least 200 blocks to the hash cluster.
    Oracle Database does not limit the number of hash key values that you can insert into the cluster. For example, even though HASHKEYS is 100, nothing prevents you from inserting 200 unique departments in the departments table. However, the efficiency of the hash cluster retrieval diminishes when the number of hash values exceeds the number of hash keys.
    >
    Using that formula above with HASHKEYS=4, SIZE=8192 and block size=8192 Oracle allocates at least 4 blocks.
    The next two paragraphs tell you what happens for a use case like yours: HASH COLLISION
    >
    To illustrate the retrieval issues, assume that block 100 in Figure 2-7 is completely full with rows for department 20. A user inserts a new department with department_id 43 into the departments table. The number of departments exceeds the HASHKEYS value, so the database hashes department_id 43 to hash value 77, which is the same hash value used for department_id 20. Hashing multiple input values to the same output value is called a hash collision.
    When users insert rows into the cluster for department 43, the database cannot store these rows in block 100, which is full. The database links block 100 to a new overflow block, say block 200, and stores the inserted rows in the new block. Both block 100 and 200 are now eligible to store data for either department. As shown in Figure 2-8, a query of either department 20 or 43 now requires two I/Os to retrieve the data: block 100 and its associated block 200. You can solve this problem by re-creating the cluster with a different HASHKEYS value.
    >
    Note the next to last sentence:
    >
    As shown in Figure 2-8, a query of either department 20 or 43 now requires two I/Os to retrieve the data: block 100 and its associated block 200.
    >
    Hmmmm - sounds suspiciously like your use case don't you think?
    Try what the doc says in that last sentence and see if it solves your problem:
    >
    You can solve this problem by re-creating the cluster with a different HASHKEYS value.
    >
    The parameters you provided and the table example you are using GUARANTEE that if more than FOUR ids are used there will be hash collisions and the result MUST BE what the doc describes. There will NEVER be space in an existing block for a second row so a new block has to be used and that means 'chaining' the blocks to find the one you need: one I/O for each block in the chain.
    Jonathan said he could not reproduce your problem but the 'hash' algorithm for his instance might have hashed 'ID=5' to a different value; his 'hash collision' might only occur for ID=2 (or 3 or 4).

  • Enable single item recovery with two retention settings at the database level.

    Hello All,
    We have an Exchange 2010 SP3 RU4 environment and planning on moving from third party archives solution to Native Exchange archives for cost reduction purposes, upgrading to Exchange 2013 to benefit from added in place features is not within scope at
    this stage.
    We are looking at implementing the following steps and want to know if it will work:
    1-Create archive DB(s) as per our usage and growth projections
    2-Enable archives for all our users and migrate current archive content to it.
    3-Create Retention Tag/Policy to move all records from live to archive "Age limit for retention" 90 days (no retention tags on the policy)
    4-Enable Single Item recovery for all of our users (script the same to run twice daily to enable SIR for newly created accounts)
    5-Set the "Keep Deleted Items" on the Live DB(s) to 90 days and the Archive DB(s) to 7 Years
    6-We are NOT using Legal Hold or plan to use it except on per as need basis
    Are we accomplishing the following:
    1-Items are automatically archived after 90 days
    2-Items archived now have a 7year retention based on the "keep deleted items" set for the archive DB(s)
    3-Items copied back to the live mailbox by a user will be returned to the archive database the next time the folder assistant runs against this user account (based on load or if run manually)
    4-Hard deleted items by a user is recoverable as long as the email record is within the retention period set at the database where it resides.
    5-Hard deleted items are recoverable using MFCMapi or by a restore.
    6-Items are permanently purged on the archive DB(s) after 7 years.
    Any input, ideas, recommendations, clarifications would be greatly valued and appreciated.  
    Ash

    Thanks CodexCZ,
    So, SIR will "kind of" do the same as the retention tag except I can use different durations based on the limits on each DB? am I correct?
    thanks again.
    Ash

Maybe you are looking for