sql - Roll back Update or delete data Through Flashback query -


I made some changes and committed, but I want to roll those changes through the flashback query.

Can you please help me how to do this?

I'm using the Oracle 11G version.

I have deleted the data from the tables below. Now I want to return those records.

Customer, address, employee, alignment

Many thanks for your help.

Sunitha.

Flashback by SCN

   

Select SELECT column_list from the table_name as SCN scn_number;

2. Flashback by TIMESTAMP

  from SELECT column_list as TIMESTAMP TO_TIMESTAMP ('timestamp value');  

To obtain current_scn and systimestamp, query:

  select current_scn, from SYSTIMESTAMP V $ database; Example  

Update as an example requested by OP.

To flash the table in the old scan, use flashbook .. then the SCN section.

  SQL & gt; Drop table string_ex PURGE; Table Dropped SQL & gt; Create table string_x (sl_ps_code VARCHAR2 (20)); The table was created in SQL & gt; Include string_x (sl_ps_code) values ​​('AR14ASM0002'); 1 row created sql & gt; Insert in string_x (sl_ps_code) values ​​('AR14SFT0018'); 1 row created sql & gt; Insert in string_x (sl_ps_code) values ​​('AR14SFT0019'); 1 row created sql & gt; Insert in string_x (sl_ps_code) values ​​('AR14SFT0062'); 1 row created sql & gt; COMMIT; Committed complete SQL & gt; SELECT current_scn, from SYSTIMESTAMP V $ database; CURRENT_SCN SYSTIMESTAMP -------------------- ---------------------------- ---------------- 13818123201277 29-OCT-14 03.02.17.419000 Prime Minister +05: 30 SQL & gt; SELECT current_scn, from SYSTIMESTAMP V $ database; CURRENT_SCN SYSTIMESTAMP -------------------- ---------------------------- ---------------- 13818123201280 29-OCT-14 03.02.22.785000 pm +05: 30 SQL & gt; SELECT current_scn, from SYSTIMESTAMP V $ database; CURRENT_SCN SYSTIMESTAMP -------------------- ---------------------------- ---------------- 13818123201282 29-OCT-14 03.02.26.781000 PM +05: 30SQL & gt; Select from string_x; SL_PS_CODE --------------- AR14ASM0002 AR14SFT0018 AR14SFT0019 AR14SFT0062 SQL & gt;  

I have four rows in the table .

  SQL & gt; Optional table string_ex row movement enabled; Table changed to SQL & gt;  

Row movement is necessary.

  SQL & gt; Remove from string_x where 2 = 1; 1 row deleted SQL & gt; SQL & gt; COMMIT; Committed complete SQL & gt; SQL & gt; Select from string_x; SL_PS_CODE --------------- AR14SFT0018 AR14SFT0019 AR14SFT0062  

I have now deleted a line and made changes.

  SQL & gt; Flash Tabs string_ex SCN 13818123201277; Flashback complete  

Flashback is full

  SQL & gt; Select from string_x; SL_PS_CODE --------------- AR14ASM0002 AR14SFT0018 AR14SFT0019 AR14SFT0062 SQL & gt;  

Now I have a table in old condition and the row has returned


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -