This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
kurs:flashback_table [2009/01/29 11:28] mh |
kurs:flashback_table [2014/09/10 21:22] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | select * from departments as of timestamp sysdate - 1/12 | ||
| + | |||
| + | desc flashback_transaction_query | ||
| + | |||
| + | === Flashback Data Archive === | ||
| + | |||
| + | <code> | ||
| + | sql> create tablespace fla datafile '/u01/app/oracle/oradata/orcl/fla01.dbf' size 10m; | ||
| + | |||
| + | SQL> create flashback archive fla1 tablespace fla quota 10m retention 1000 year; | ||
| + | |||
| + | Flashback archive created. | ||
| + | |||
| + | SQL> grant flashback archive on fla1 to bla; | ||
| + | |||
| + | Grant succeeded. | ||
| + | |||
| + | als user | ||
| + | SQL> alter table blu flashback archive fla1; | ||
| + | |||
| + | DMLs | ||
| + | sql> commit; | ||
| + | |||
| + | SQL> select * from user_flashback_archive_tables; | ||
| + | SQL> select * from blu as of timestamp (systimestamp - ds_interval('0 00:02:00')); | ||
| + | |||
| + | </code> | ||
| + | |||
| + | === Flashback Transaction Backout === | ||
| + | |||
| + | <code> | ||
| + | SQL> startup mount | ||
| + | ORACLE instance started. | ||
| + | SQL> alter database archivelog; | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> alter database add supplemental log data; | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> alter database add supplemental log data (primary key) columns; | ||
| + | |||
| + | Database altered. | ||
| + | SQL> startup force | ||
| + | SQL> alter system archive log current; | ||
| + | SQL> alter system archive log current; | ||
| + | |||
| + | sql> dmls an der tabelle => commit | ||
| + | |||
| + | im em schema-> tables -> flashback transactions | ||
| + | </code> | ||