Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to revert database changes?

Posted on 2011-04-29
10
Medium Priority
?
820 Views
Last Modified: 2012-05-11
How to revert all the database changes did yesterday?
0
Comment
Question by:Niyas
  • 4
  • 3
  • 3
10 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 35490401
depending on version, how many and what kinds of changes you might be able to use flashback database


or,  restore from backup and do a point-in-time recovery
0
 
LVL 7

Expert Comment

by:Piloute
ID: 35490531
Hi,

When asking questions, be more precise than 'the stuff doesn't work', because that's a non question to most of us.

Could you please post MORE information about your problem ?
Like
- which oracle version you have ?
- do you have any backup ?
- are you archiving your logs ?
- have you enabled database flashback feature ?
etc...

We can not 'guess' the answers in order to help you....

Cheers,
P
0
 
LVL 1

Author Comment

by:Niyas
ID: 35491120
Hi,
You are right. Since I am a .net developer, I don't know how to ask DBA related questions.

I am using Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production.
I don't know any other details.
I thought I can undo or transaction rollback simply.
Sorry
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 74

Accepted Solution

by:
sdstuber earned 1000 total points
ID: 35491194
9i supports flashback queries, but not flashback database
but even with flashback queries there are limits to what you can do

to "undo" an entire day, you'll need to have your DBA assist
0
 
LVL 7

Assisted Solution

by:Piloute
Piloute earned 1000 total points
ID: 35491208
OK. In this case, buy a good beer to your dba.

He/she could be the person who might help you. If you are not a dba, you have no mean to restore a database... since you don't even have the admin rights on that db.

A 'rollback' is related to a transaction, that means you can do it as long as you haven't issued a 'commit' on your personal sql requests...

Cheers,
P
0
 
LVL 1

Author Comment

by:Niyas
ID: 35491390
THanks, Will the flashback queries show us what are all the transactions we did?

0
 
LVL 74

Expert Comment

by:sdstuber
ID: 35491508
flashback queries lets you do something like this...


select * from yourtable AS OF TIMESTAMP (SYSTIMESTAMP - INTERVAL ’1’ DAY)

which would let you query your table as if it were one day ago
0
 
LVL 1

Author Comment

by:Niyas
ID: 35491532
Thanks, Excellent
0
 
LVL 7

Expert Comment

by:Piloute
ID: 35492273
OK. But to use flashback features, your dba needs to do some config of your database. So if he have not configured already your db, you won't ba able to use this feature...

Here's docs about how Flashback features work :
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_flashback.htm#sthref1459

Another point is retention time of your undo data.... what's your DB_FLASHBACK_RETENTION_TARGET value ? That's minues, and it is 900 as defuault value...
If you haven't changed it and there's activity on your database, you might not have anymore your old data...

P
0
 
LVL 7

Expert Comment

by:Piloute
ID: 35492314
Ohhh, just realized your db is a 9i. Well it should work in a similar manner, since you still need the undo data...

You still need to use automatic undo management and have a fair UNDO_RETENTION (this is the parameter for 9i)

P
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses
Course of the Month15 days, 5 hours left to enroll

577 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