
Habilitar a funcionalide de Flashback no banco de dados é uma tarefa simples que envolve o parâmetro DB_FLASHBACK_RETENTION_TARGET e a ativação do Flashback na base de dados. Sendo assim, neste post estarei abordando a ativação desta funcionalidade .
Segue abaixo o exemplo:
- Configuração do parâmetro DB_FLASHBACK_RETENTION_TARGET para definir o tempo de retenção a cada snapshot do Flashback:
SQL> select instance_name, status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ orabol2 OPEN SQL> ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=1440; System altered. SQL> show parameters DB_FLASHBACK_RETENTION_TARGET NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_flashback_retention_target integer 1440
- Ativação do Flashback na base de dados:
SQL> ALTER DATABASE FLASHBACK ON; Database altered.
- Validação das configurações definidas através das views V$FLASHBACK_DATABASE_STAT e V$DATABASE:
SQL> SELECT FLASHBACK_ON FROM V$DATABASE; FLASHBACK_ON ------------------ YES SQL> set pages 2000 SQL> set lines 2000 SQL> select * from V$FLASHBACK_DATABASE_STAT; BEGIN_TIM END_TIME FLASHBACK_DATA DB_DATA REDO_DATA ESTIMATED_FLASHBACK_SIZE --------- --------- -------------- ---------- ---------- ------------------------ 26-FEB-17 26-FEB-17 40960 0 1536 0 SQL>
- Caso decida desabilitar o Flahsback, segue o exemplo:
SQL> ALTER DATABASE FLASHBACK OFF; Database altered. SQL> SQL> SQL> SELECT FLASHBACK_ON FROM V$DATABASE; FLASHBACK_ON ------------------ NO


*The views expressed here are my own and do not represent those of my employer.*
Hello, I’m Bruno — a dual citizen of Brazil and Sweden. I bring a global perspective shaped by experiences in both South America and Europe, with a strong focus on collaboration and innovation across cultures. I am a Computer Scientist, PhD Candidate in Information and Communication Technologies, focusing on Data Science and Artificial Intelligence, and hold dual Master’s degrees in Data Science and Cybersecurity. With over fifteen years of international experience spanning Brazil, Hungary, and Sweden, I have collaborated with global organizations such as IBM, Playtech, and Oracle, as well as contributed remotely to projects across multiple regions. My professional interests include Databases, Cybersecurity, Cloud Computing, Data Science, Data Engineering, Big Data, Artificial Intelligence, Programming, and Software Engineering, all driven by a deep passion for transforming data into strategic business value.