Flashback Version Query Flashback Tranaction Query

bu örnekte ilk önce version queryden gidebildiğimiz bütün zaman araladığındaki dml komutlarının id sini buluyoruz. İkinci queryde ise bu transactionların undo sql görebiliyoruz. Undo sqlleri sql plusta çalıştırırsak o transactionı geri almış oluruz.

SQL> SELECT , VERSIONS_STARTTIME , VERSIONS_ENDTIME, VERSIONS_XID , VERSIONS_OPERATION FROM test VERSIONS BETWEEN TIMESTAMP MINVALUE AND MAXVALUE ORDER BY VERSIONS_ENDTIME;

VERSIONS_STARTTIME VERSIONS_ENDTIME VERSIONS_XID VERSIONS_OPERATION

SQL> SELECT xid , operation , undo_sql FROM flashback_transaction_query WHERE table_owner = ZEKERIYA AND table_name = ‘TEST’ ORDER BY start_timestamp;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s