Veljko89
Veljko89

Reputation: 1953

Oracle SQL table history

So this is the problem, I have a Oracle table, just a normal table with let's say 300 rows of data.

I need to figure out how that data looked like at least 100 days before, who made changes and timestamp would be nice also. Thing is, I do have a schedule backup, but I believe someone changed data and removed backup, so I am trying to find out this change over system records.

I did google this and for results I got now, I didn't got what I needed.

Oracle SQL info - Java(TM) Platform 1.7.0_51 Oracle IDE 4.0.0.13.80 Versioning Support 4.0.0.13.80

Do you guys have any other idea? Thank you in advance

Upvotes: 2

Views: 9276

Answers (1)

GolezTrol
GolezTrol

Reputation: 116110

You may use flashback: Using Oracle Flashback Technology

With that, you can query using the AS OF TIMESTAMP clause, like this:

SELECT * FROM yourtable
  AS OF TIMESTAMP TO_TIMESTAMP('2004-04-04 09:30:00', 'YYYY-MM-DD HH:MI:SS');

This has to be enabled though, and there is a certain (configurable) size limit, so there is no guarantee that you can still query those records of 100 days ago. On a busy database the history may go back only a couple of minutes.

Upvotes: 3

Related Questions