• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 423
  • Last Modified:

delete table

I accidently delete a table
and commit  accidently

delete from tab1;
commit
Is there any way to recover that table?
0
nobleit
Asked:
nobleit
  • 3
  • 3
  • 2
  • +1
1 Solution
 
slightwv (䄆 Netminder) Commented:
What version of Oracle?

QUICK:  google flashback table!!!

You might be able to use flashback to recover.
0
 
pdd1lanCommented:
0
 
nobleitAuthor Commented:
oracle 11g is the version
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
pdd1lanCommented:
more info here, hope it helps
http://wiki.oracle.com/page/4+DROP+TABLE
0
 
slightwv (䄆 Netminder) Commented:
And did flashback table work?
0
 
nobleitAuthor Commented:
This is what I did..
I did timestamp function myselft -- data backed up anyway.

But still I have doubts..
SQL> desc emp;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 EMPNO                                     NOT NULL NUMBER(4)
 ENAME                                              VARCHAR2(10)
 JOB                                                VARCHAR2(9)
 MGR                                                NUMBER(4)
 HIREDATE                                           DATE
 SAL                                                NUMBER(7,2)
 COMM                                               NUMBER(7,2)
 DEPTNO                                             NUMBER(2)

SQL> select * from emp;

no rows selected

Elapsed: 00:00:00.01
SQL> insert into emp(select * from emp as of timestamp(sysdate - 5/1440));

0 rows created.

Elapsed: 00:00:00.14
SQL> select count(*) from emp;

  COUNT(*)                                                                      
----------                                                                      
         0                                                                      

Elapsed: 00:00:00.00
SQL> insert into emp(select * from emp as of timestamp(sysdate - 40/1440));

14 rows created.

Elapsed: 00:00:00.06
SQL> select count(*) from emp;

  COUNT(*)                                                                      
----------                                                                      
        14                                                                      

but to convince my logic can I ask you this

in that 40/1440 what is 40 and 1440 respectively,

40 is minutes or what and what is 1440..

0
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
that means flashback the table as of 40 mins before the current time.

40 means mins and 1440 total mins per day ( 24 * 60 ).
0
 
slightwv (䄆 Netminder) Commented:
1440 is the number of minutes in a day.

You add and subtract the number of days from sysdate.

If I did my math right, sysdate-40/1440 is 40 minutes ago.

You do realize that the longer you take to flashback, the harder it will be to recover.

If you know when you did the delete, do as of timestamp to_timestamp('01/01/2010 01:01','MM/DD/YYYY HH24:MI')
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now