grant flashback on scott.emp to jim;or you can grant user jim a system privilege to flashback any table:
grant flashback any table to jim;
Minimalistic Oracle contains a collection of practical examples from my encounters with Oracle technologies. When relevant, I also write about other technologies, like Linux or PostgreSQL. Many of the posts starts with "how to" since they derive directly from my own personal experience. My goal is to provide simple examples, so that they can be easily adapted to other situations.
grant flashback on scott.emp to jim;or you can grant user jim a system privilege to flashback any table:
grant flashback any table to jim;
connect sys/passwd as sysdba
SQL>connect scott/passwd SQL>select album_id,album_title,artist_id from album where artist_id=10; ALBUM_ID ALBUM_TITLE ARTIST_ID ---------- -------------------------------------------------- ---------- 10 Joshua tree 10 11 Achtung Baby 10 12 Zooropa 10 SQL>
SQL> insert into album (album_id, album_title,artist_id) values(200,'Whiplash Smile', 10); 1 row created. SQL> commit; Commit complete. SQL> select album_id,album_title,artist_id from album where artist_id=10; ALBUM_ID ALBUM_TITLE ARTIST_ID ---------- -------------------------------------------------- ---------- 200 Whiplash Smile 10 10 Joshua tree 10 11 Achtung Baby 10 12 Zooropa 10
SQL> execute dbms_flashback.enable_at_time(sysdate-5/1440); PL/SQL procedure successfully completed. SQL> select album_id,album_title,artist_id from album where artist_id=10; ALBUM_ID ALBUM_TITLE ARTIST_ID ---------- -------------------------------------------------- ---------- 10 Joshua tree 10 11 Achtung Baby 10 12 Zooropa 10
SQL> execute dbms_flashback.disable(); PL/SQL procedure successfully completed.
grant flashback on scott.album to jim;Alternatively, you can grant jim the system privilege flashback any table:
connect / as sysdba grant flashback any table to jim;Sources: Oracle Documentation This document from Oracle Support