oracle用户登录失败ORA-00257处理
现象:
sqlplus cdes/Admin_12@ossuatdb
SQL> conn cdes/Admin_12@ossuatdb
ERROR:
ORA-00257: Archiver error. Connect AS SYSDBA only until resolved.
Warning: You are no longer connected to ORACLE.
分析错误日志
2021-06-24T12:28:27.149200+08:00
WARNING: inbound connection timed out (ORA-3136)
2021-06-24T12:29:16.016380+08:00
Errors in file /ossuatdb_log/diag/rdbms/osscdb/ossuatcdb/trace/ossuatcdb_tt00_17654.trc:
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 209715200 bytes disk space from 16106127360 bytes limit
2021-06-24T12:30:16.018354+08:00
Errors in file /ossuatdb_log/diag/rdbms/osscdb/ossuatcdb/trace/ossuatcdb_tt00_17654.trc:
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 209715200 bytes disk space from 16106127360 bytes limit
30474,1
*** 2021-06-24T12:31:16.019849+08:00 (CDB$ROOT(1))
<error barrier> at 0x7ffda0ed5fc8 placed krsi.c@11829
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 209715200 bytes disk space from 16106127360 bytes limit
krsi_dest_check: Exception when reserving disk space for OMF, or getting file name or creating test file
krsd_check_stuck_arch: inactive mandatory LAD:1
*** 2021-06-24T12:32:16.021866+08:00 (CDB$ROOT(1))
<error barrier> at 0x7ffda0ed5fc8 placed krsi.c@11829
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 209715200 bytes disk space from 16106127360 bytes limit
krsi_dest_check: Exception when reserving disk space for OMF, or getting file name or creating test file
krsd_check_stuck_arch: inactive mandatory LAD:1
2021-06-19T17:04:09.071610+08:00
Errors in file /ossuatdb_log/diag/rdbms/osscdb/ossuatcdb/trace/ossuatcdb_m001_19818.trc:
ORA-19815: WARNING: db_recovery_file_dest_size of 16106127360 bytes is 97.45% used, and has 410209280 remaining bytes available.
2021-06-19T17:04:09.107794+08:00
************************************************************************
You have following choices to free up space from recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
system command was used to delete files, then use RMAN CROSSCHECK and
DELETE EXPIRED commands.
DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-10';
根据提示清理归档日志,并编写脚本自动清理
cat /home/oracle/script/del_css_arch.sh
#!/bin/bash
export ORACLE_BASE=/opt/oracle19c/
export ORACLE_HOME=/opt/oracle19c/product/19.3.0/db_1
export ORACLE_SID=cssuatcdb
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export LIBPATH=$LIBPATH:$ORACLE_HOME/lib
rman target / <<EOF
run
{
crosscheck backup;
delete noprompt expired backup;
delete noprompt archivelog until time 'sysdate-7';
}
exit;
EOF
0 23 * * * sh /home/oracle/script/del_oss_arch.sh >> /home/oracle/script/del_oss_arch.log
0 22 * * * sh /home/oracle/script/del_css_arch.sh >> /home/oracle/script/del_css_arch.log