Solved

delete table

Posted on 2011-03-24
9
406 Views
Last Modified: 2012-08-14
I accidently delete a table
and commit  accidently

delete from tab1;
commit
Is there any way to recover that table?
0
Comment
Question by:nobleit
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35211717
What version of Oracle?

QUICK:  google flashback table!!!

You might be able to use flashback to recover.
0
 
LVL 8

Expert Comment

by:pdd1lan
ID: 35211719
0
 

Author Comment

by:nobleit
ID: 35211759
oracle 11g is the version
0
 
LVL 8

Expert Comment

by:pdd1lan
ID: 35211803
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 8

Expert Comment

by:pdd1lan
ID: 35211815
more info here, hope it helps
http://wiki.oracle.com/page/4+DROP+TABLE
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35211876
And did flashback table work?
0
 

Author Comment

by:nobleit
ID: 35211906
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
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 35211980
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
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 35211991
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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now