首页 > 网站 > 建站经验 > 正文

Oracl!e闪回区满

2019-11-02 15:30:15
字体:
来源:转载
供稿:网友

   一台老的测试AIX服务器,没人理过,最近一看Oracle闪回满了。清理了下。

  Version: Oracle 10gR2 for AIX

  现象:

?

1 2 3 4 5 6 7 SQL> alter database open; alter database open * ERROR at line 1: ORA-16014: log 3 sequence# 157 not archived, no available destinations ORA-00312: online log 3 thread 1: '/opt/oracle/software/oradata/orcl/redo03.log'

  报这个错误是因为闪回区满了:

?

1 2 3 4 5 6 7 8 -- 扩大闪回区空间 SQL> alter system set db_recovery_file_dest_size=3g scope=both;   System altered.   SQL> alter database open;   Database altered.

  闪回区相关信息查询:

?

1 2 3 4 5 6 7 8 --查看归档模式  SQL> archive log list;   --归档空间使用率 SQL> select * from v$flash_recovery_area_usage;   --闪回区所占用的空间 SQL> select sum(percent_space_used)*3/100 from v$flash_recovery_area_usage;

  释放空间:

?

1 2 3 4 5 6 7 8 9 10 11 12 13 --删除备份 crosscheck backupset; delete noprompt expired backupset; delete obsolete; delete noprompt expired backup; delete noprompt expired copy;   --清掉归档 --清掉过期的归档 crosscheck archivelog all; delete noprompt expired archivelog all; --要还不够,强制删除掉指定天数前的归档 delete noprompt archivelog all completed before 'sysdate-7';

  除了在闪回区删文件,或扩空间的方式,还可以通过将归档指定到其它目录的方式来做。

?

1 2 3 4 5 6 7 8 9 10 11 SQL> alter system set log_archive_dest_1='location=/nfsdisk/oraarc' scope=both ;   System altered.   SQL> archive log list; Database log mode              Archive Mode Automatic archival             Enabled Archive destination            /nfsdisk/oraarc Oldest online log sequence     161 Next log sequence to archive   161 Current log sequence           163
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表