Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 737
  • Last Modified:

How do roll back my database to a previous time

I am adding entries into my database soon, this does not happen often at my place of work. I would like to make sure that in the event that the data entry does not go to plan I can rollback my database to a previous state (now).

Do I have to do anything beforehand to make this possible? How do I preform a rollback if it is necessary?

I am using oracle 8.1 and windows 2000 server.
0
Nopax
Asked:
Nopax
  • 2
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you could put all the changes into 1 transaction, and commit/rollback once the change should be commited or rolled back.
however, no other session will be able to see that (new) data until committed, so you cannot check the results of that new data.

you would need to either
* prepare the scripts to undo those changes (ie create a UPDATE for an UPDATE, a INSERT for a DELETE you do, and a DELETE for a INSERT you do),
or
* create copies of the tables, and get the data back (complex scripts again, and what about the other users/transactions?)
or
* perform an export of the table data, to be imported back (however, what about the other users/transactions?)
...
0
 
NopaxAuthor Commented:
I can make sure that there are no user connected. There are only 3 people that connect to it and they are all in the same room. Down time is not a big concern at all.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you could do the following:
* stop the oracle database
* copy all the relevant database files
* start the oracle database

in case of rollback:
* stop the oracle database
* copy back all the relevant database files
* start the oracle database
0
 
NopaxAuthor Commented:
Oh, I wasn't sure that would work. But if that is possible it is certainly the solution for me.

Thanks
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

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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