Home > database >  How to obtain a certain table Oracle data change
How to obtain a certain table Oracle data change

Time:09-25

Have a table, for example, to insert the 10 data or updated one or a few data, how do I know what is the newly inserted or what is the updated, updated several fields?

CodePudding user response:

Check the redo log
Or
In the simplest way
Select * from T1 as of timestamp to_timestamp (' 22:10:00 2017-12-04 ', '- DD YYYY - MM HH24: MI: SS'); - time yourself decide, you can view the tables under the contrast,

CodePudding user response:

Build a materialized view log analysis

CodePudding user response:

Ora_rowscn how long before it can get the data changes, 2 hours after ora_rowscn access time is not allowed

CodePudding user response:

Query for a short period of time, you can refer to the 2 # advice, this depends on the UNDO;

If long time record of these data, you can use the trigger, the changes before the data, backup to another table

CodePudding user response:

Oracle log mining tools can also find all the operations on the table, can search on the Internet under the logminer to understand the directions,

CodePudding user response:

Can rely on # 2, or business implementation, such as table inside to join a recent operation type (update, insert), a recently operating time

CodePudding user response:

Update or insert, update or insertion time, by this time, you know how to update and insert

CodePudding user response:

1, through the flashback, flashback can view the content of the short time
2, log by logminer analysis, can see
3, through the establishment of the trigger, writes the content of the specified view in the table will change

CodePudding user response:

All say good depth,
1. On the table two redundant createddate, modifieddate fields, can be positioning data is carried on the insert or update operation
2. If you want to locate to update the field, it is recommended that the trigger
  • Related