一、更改归档目录 1.查看参数db_recovery_file_dest
(1)“db_recovery_file_dest”是用于定义存储归档日志的目录。通过show parameter命令,显示参数的值为(默认为)fast_recovery_area。示例如下:
SQL> show parameter db_recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /usr/local/oracle/flash_recovery_area
db_recovery_file_dest_size big integer 4182M
(2)查看v$recovery_file_dest视图,可得知fast_recovery_area的空间限制、已使用的空间、文件数等。
SQL> select * from v$recovery_file_dest;
NAME SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
----------- ---------- ----------------- ---------------
D:\oracle\fast_recovery_area 4385144832 4346230272 2741248 102 2.更改归档日志目录
语法:alter system set 参数=值 scope=spfile;(设置成比较大的空间的目录,我这里是设置成了home下面)
示例:SQL> alter system set db_recovery_file_dest='/home/oracle/flash_recovery_area' scope=spfile;
System altered.
二、更改归档日志大小 1.查看参数'db_recovery_file_dest_size'值
SQL> show parameter db_recov
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /usr/local/oracle/flash_recovery_area
db_recovery_file_dest_size big integer 4182M
2.更改参数'db_recovery_file_dest_size'值大小
SQL> alter system set db_recovery_file_dest_size=41820M scope=spfile;
System altered.
3.关闭数据库,重启数据库
SQL> shutdownimmediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup open;
ORACLE instance started.
Total System Global Area 2572144640 bytes
Fixed Size 2283984 bytes
Variable Size 738199088 bytes
Database Buffers 1828716544 bytes
Redo Buffers 2945024 bytes
Database mounted.
Database opened. 4.再次查看参数'db_recovery_file_dest_size'值 SQL> show parameter db_reco
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /home/oracle/flash_recovery_area
db_recovery_file_dest_size big integer 41820M