Steps to enable flahsback on oracle database:
connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Advanced Analytics
and Real Application Testing options
set the recovery file dest location & size & set the flashback retention
SQL> alter system set db_recovery_file_dest='/media/sf_12cR1/flashback' scope=both;
System altered.
SQL> alter system set db_recovery_file_dest_size=100g scope=both;
System altered.
SQL> show parameter db_recovery_file_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /media/sf_12cR1/flashback
db_recovery_file_dest_size big integer 100G
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2290416 bytes
Variable Size 1711279376 bytes
Database Buffers 419430400 bytes
Redo Buffers 4886528 bytes
Database mounted.
SQL> alter database flashback on;
Database altered.
SQL> alter system set db_flashback_retention_target=6000;
System altered.
SQL> SELECT NAME, FLASHBACK_ON FROM V$DATABASE;
NAME FLASHBACK_ON
--------- ------------------
CDB1 YES
SQL> alter database open;
Database altered.
connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Advanced Analytics
and Real Application Testing options
set the recovery file dest location & size & set the flashback retention
SQL> alter system set db_recovery_file_dest='/media/sf_12cR1/flashback' scope=both;
System altered.
SQL> alter system set db_recovery_file_dest_size=100g scope=both;
System altered.
SQL> show parameter db_recovery_file_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /media/sf_12cR1/flashback
db_recovery_file_dest_size big integer 100G
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2290416 bytes
Variable Size 1711279376 bytes
Database Buffers 419430400 bytes
Redo Buffers 4886528 bytes
Database mounted.
SQL> alter database flashback on;
Database altered.
SQL> alter system set db_flashback_retention_target=6000;
System altered.
SQL> SELECT NAME, FLASHBACK_ON FROM V$DATABASE;
NAME FLASHBACK_ON
--------- ------------------
CDB1 YES
SQL> alter database open;
Database altered.
No comments:
Post a Comment