1.Database has to be in Archivelog mode
SQL> select log_mode from v$database;
LOG_MODE
------------
NOARCHIVELOG
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1573527552 bytes
Fixed Size 1345184 bytes
Variable Size 436210016 bytes
Database Buffers 1124073472 bytes
Redo Buffers 11898880 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 22
Next log sequence to archive 24
Current log sequence 24
SQL> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG
2. Configure Flash Recovery Area.
3.To enable or disable flashback , we can change this while database is in open mode.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
SQL> alter database flashback on;
Database altered.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
SQL> alter database flashback off;
Database altered.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
SQL> select log_mode from v$database;
LOG_MODE
------------
NOARCHIVELOG
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1573527552 bytes
Fixed Size 1345184 bytes
Variable Size 436210016 bytes
Database Buffers 1124073472 bytes
Redo Buffers 11898880 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 22
Next log sequence to archive 24
Current log sequence 24
SQL> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG
2. Configure Flash Recovery Area.
3.To enable or disable flashback , we can change this while database is in open mode.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
SQL> alter database flashback on;
Database altered.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
SQL> alter database flashback off;
Database altered.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
0 comments:
Post a Comment