ORA-00257: archiver error. Connect internal only, until freed引发的血案

简介: 我一向都是已解决方法为目的来解决问题,导致有些概念模糊不清晰。 先写下解决方法。 SQL> select * from V$FLASH_RECOVERY_AREA_USAGE; FILE_TYPE    PERCENT_SPACE_USED PERCENT_SPACE_R...
我一向都是已解决方法为目的来解决问题,导致有些概念模糊不清晰。

先写下解决方法。

SQL> select * from V$FLASH_RECOVERY_AREA_USAGE;

FILE_TYPE    PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------
CONTROLFILE                   0                         0               0
ONLINELOG                     0                         0               0
ARCHIVELOG                48.21(这个已经快满了,当时)                         0             306
BACKUPPIECE                   0                         0               0
IMAGECOPY                     0                         0               0
FLASHBACKLOG                .06                         0              11


进入RMAN执行
rman target  / 

检查一些无用的archivelog
RMAN> crosscheck archivelog all;
  删除过期的归档
RMAN> delete expired archivelog all;


当初对delete obsolete和delete expired 这两个概念是模糊的。而且对report和crosscheck的概念也有些模糊不清。

以下是官方文档对crosscheck和expired的解释

When the CROSSCHECK command is used to determine whether backups recorded in the repository still exist on disk or tape, if RMAN cannot locate the backups, then it updates their records in the RMAN repository to EXPIRED status. You can then use the DELETE EXPIRED command to remove records of expired backups from the RMAN repository. If the expired files still exist, then the DELETE EXPIRED command terminates with an error.


To delete expired repository records:

  1. If you have not performed a crosscheck recently, then issue a CROSSCHECK command. For example, issue:

              CROSSCHECK BACKUP; # checks backup sets and copies on configured channels
    
    
  2. Delete the expired backups. For example, issue:

              DELETE EXPIRED BACKUP;
    

读后感,delete expired 就是删除RMAN repository 的被标记为expired的records。
 
下面是delete  obsolete的解释

          The RMAN DELETE command supports an OBSOLETE option, which deletes backups that are obsolete, that is, no longer needed to satisfy specified recoverability requirements. You can delete files obsolete according to the configured default retention policy, or another retention policy that you specify as an option to the DELETE OBSOLETE command. As with other forms of the DELETE command, the files deleted are removed from backup media, deleted from the recovery catalog, and marked as DELETED in the control file.

         
          If you specify the DELETE OBSOLETE command with no arguments, then RMAN deletes all obsolete backups defined by the currently configured retention policy For example:

           DELETE OBSOLETE;

          You can also use the REDUNDANCY or RECOVERY WINDOW clauses with DELETE to delete backups obsolete under a specific retention policy instead of the configured default:

           DELETE OBSOLETE REDUNDANCY = 3;
           DELETE OBSOLETE RECOVERY WINDOW OF 7 DAYS;

delete obsolete就是根据备份策略直接的删除以前那些obsolete的backups。


REPORT的概念
    用来分析可用的备份和让你的数据库回答一些重要的问题,例如: 
          哪些文件需要备份? 
          哪些文件有做过不可恢复的操作? 
          哪些备份是废弃的且可以删除的?
          之前一段时间内的数据库的物理schema是怎么样的?
          目前哪些文件还没有备份?

   

REPORT NEED BACKUP

分析哪些数据文件在制定的策略下面需要备份

REPORT UNRECOVERABLE
分析哪些数据文件需要备份,由于这些文件做了一些nologging的操作,例如direct-path insert

 

REPORT NEED BACKUP RECOVERY WINDOW OFn DAYS

REPORT NEED BACKUP REDUNDANCYn             

REPORT NEED BACKUP DAYS = n                 展示有N天的archived redo log 可供恢复使用的文件需要备份

REPORT NEED BACKUP INCREMENTAL n           


 

RMAN> REPORT NEED BACKUP TABLESPACE TBS_3     需要备份的表空间

RMAN> REPORT UNRECOVERABLE;                            不可恢复操作的数据文件的备份的需要
RMAN> REPORT OBSOLETE;                                      分析哪些废弃的文件可以被删除。

RMAN> REPORT SCHEMA;        展示数据库的数据文件的信息

REPORT SCHEMA AT TIME 'SYSDATE-14';     # schema 14 days ago
REPORT SCHEMA AT SCN 1000;              # schema at scn 1000
REPORT SCHEMA AT SEQUENCE 100 THREAD 1; # schema at sequence 100

 

 




 

相关文章
|
6月前
|
SQL Oracle 关系型数据库
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database (
93 2
|
数据库
ORA-06553: PLS-801: internal error 的解决办法
搜索了一下,原来是把32位的数据库恢复到64位的数据库了。找到解决方案如下
165 0
|
SQL Oracle 关系型数据库
Oracle中Error while performing database login with the XXXdriver; Listener refused the connection wit...
Oracle中Error while performing database login with the XXXdriver; Listener refused the connection wit...
255 0
|
关系型数据库 数据库
ORA-12154: TNS:could not resolve the connect identifier specified
在安装ORACLE安装的时候,报如下错误:ORA-12154: TNS:could not resolve the connect identifier specified。如下图所示: 折腾了很久才找到罪魁祸首:原来在安装数据库时,设置用户密码的时候里面包含了@符号,引起了这个错误,这个错误倒是有点诡异,应该是ORACLE连接DB时就把口令@后面的串当连接字用了。
3022 0
|
Oracle 关系型数据库 数据库
Oracle中Error while performing database login with the XXXdriver; Listener refused the connection with the following error; ORA-12505,TNS:listener does
一次连接数据库怎么也连接不上,查了多方面资料,终于找到答案,总结 首先应该保证数据库的服务启动 在myeclipse的数据库视图中点 右键->new 弹出database driver的窗口, Driver template选择oracle(thin driver), Driver name 输入...
1132 0