Prev | Current Page 382 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"

employees set manager_id = 100 where employee_id = 195;
1 row updated.
SQL> commit;
Chapter 7: Managing Transactions with Undo Tablespaces 233
Commit complete.
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
4011464
SQL> update hr.employees set department_id = 660 where employee_id = 195;
1 row updated.
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
4011470
SQL> update hr.employees set salary = salary*1.2 where employee_id=195;
1 row updated.
SQL> commit;
Commit complete.
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
4011508
SQL>
The next day, the HR user is out of the office, and the other HR department employees wants
to know what rows and tables were changed. Using Flashback Version Query, the user HR can
see not only the values of a column at a particular time, but the entire history of changes between
specified timestamps or SCNs.
A Flashback Version Query uses the versions between clause to specify a range of SCNs
or timestamps for analysis of a given table (in this case, the EMPLOYEES table). When versions
between is used in a Flashback Version Query, a number of pseudocolumns are available to help
identify the SCN and timestamp of the modifications, as well as the transaction ID and the type
of operation performed on the row.


Pages:
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394
booking Biżuteria swarovskiego remont warszawa grzejniki łazienkowe best online loans for people with bad credit