此时数据库是open的。
SQL> alter system set db_recovery_file_dest='/pmsdb/oracle/flash_recovery_area';
System altered.
SQL> show parameter db_r
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /pmsdb/oracle/flash_recovery_a
rea
db_recovery_file_dest_size big integer 10G
db_recycle_cache_size big integer 0
dbwr_io_slaves integer 0
SQL> alter system set db_recovery_file_dest_size=20m;
System altered.
SQL> show parameter db_re
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /pmsdb/oracle/flash_recovery_a
rea
db_recovery_file_dest_size big integer 20M
db_recycle_cache_size big integer 0
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /pmsdb/oracle/arch
Oldest online log sequence 9
Next log sequence to archive 11
Current log sequence 11
SQL> !ls /pmsdb/oracle/arch
1_10_783515943.dbf
打算此时开启闪回功能,为了方便我直接startup mount force=shutdown abort+startup mount
SQL> startup mount force
ORACLE instance started.
Total System Global Area 2443997184 bytes
Fixed Size 1338224 bytes
Variable Size 754975888 bytes
Database Buffers 1677721600 bytes
Redo Buffers 9961472 bytes
Database mounted.
SQL> !ls -l /pmsdb/oracle/flash_recovery_area
total 0
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38714: Instance recovery required.----报错
SQL> alter database open;
Database altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 2443997184 bytes
Fixed Size 1338224 bytes
Variable Size 754975888 bytes
Database Buffers 1677721600 bytes
Redo Buffers 9961472 bytes
Database mounted.
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38708: not enough space for first flashback database log file
SQL> show parameter db_r
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /pmsdb/oracle/flash_recovery_a
rea
db_recovery_file_dest_size big integer 20M
db_recycle_cache_size big integer 0
dbwr_io_slaves integer 0
SQL> alter system set db_recovery_file_dest_size=150m;----给的空间太少
System altered.
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38708: not enough space for first flashback database log file
SQL> alter system set db_recovery_file_dest_size=500m;
System altered.
SQL> alter database flashback on;
Database altered.
SQL>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24500180/viewspace-730226/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24500180/viewspace-730226/