ORA-00257 错误处理

Posted 夜光小兔纸

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ORA-00257 错误处理相关的知识,希望对你有一定的参考价值。

一、错误描述

使用plsql develop工具登录数据库时,有如下报错:

ORA-00257:archiver error. Connect internal only. unitl freed.

二、错误原因

archive log 日志已满

三、处理方法

1.用sys用户登录

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 13 13:52:09 2022

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

2.查看archivlog所在位置

SQL> show parameter log_archive_dest;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest                     string
log_archive_dest_1                   string
log_archive_dest_10                  string
log_archive_dest_11                  string
log_archive_dest_12                  string
log_archive_dest_13                  string
log_archive_dest_14                  string
log_archive_dest_15                  string
log_archive_dest_16                  string
log_archive_dest_17                  string
log_archive_dest_18                  string
log_archive_dest_19                  string
log_archive_dest_2                   string
log_archive_dest_20                  string
log_archive_dest_21                  string
log_archive_dest_22                  string
log_archive_dest_23                  string
log_archive_dest_24                  string
log_archive_dest_25                  string
log_archive_dest_26                  string
log_archive_dest_27                  string
log_archive_dest_28                  string
log_archive_dest_29                  string
log_archive_dest_3                   string
log_archive_dest_30                  string
log_archive_dest_31                  string
log_archive_dest_4                   string
log_archive_dest_5                   string
log_archive_dest_6                   string
log_archive_dest_7                   string
log_archive_dest_8                   string
log_archive_dest_9                   string
log_archive_dest_state_1             string      enable
log_archive_dest_state_10            string      enable
log_archive_dest_state_11            string      enable
log_archive_dest_state_12            string      enable
log_archive_dest_state_13            string      enable
log_archive_dest_state_14            string      enable
log_archive_dest_state_15            string      enable
log_archive_dest_state_16            string      enable
log_archive_dest_state_17            string      enable
log_archive_dest_state_18            string      enable
log_archive_dest_state_19            string      enable
log_archive_dest_state_2             string      enable
log_archive_dest_state_20            string      enable
log_archive_dest_state_21            string      enable
log_archive_dest_state_22            string      enable
log_archive_dest_state_23            string      enable
log_archive_dest_state_24            string      enable
log_archive_dest_state_25            string      enable
log_archive_dest_state_26            string      enable
log_archive_dest_state_27            string      enable
log_archive_dest_state_28            string      enable
log_archive_dest_state_29            string      enable
log_archive_dest_state_3             string      enable
log_archive_dest_state_30            string      enable
log_archive_dest_state_31            string      enable
log_archive_dest_state_4             string      enable
log_archive_dest_state_5             string      enable
log_archive_dest_state_6             string      enable
log_archive_dest_state_7             string      enable
log_archive_dest_state_8             string      enable
log_archive_dest_state_9             string      enable

3.VALUE为空时,可用archive log list;查看归档目录和log sequence

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     236
Next log sequence to archive   241
Current log sequence           241

4.查看flash recovery area的使用情况

SQL> select * from V$FLASH_RECOVERY_AREA_USAGE;

FILE_TYPE            PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE  NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ----------------
CONTROL FILE                          0                         0                0

REDO LOG                              0                         0                0

ARCHIVED LOG                      91.18                         0              101

BACKUP PIECE                        .55                         0                1

IMAGE COPY                            0                         0                0

FLASHBACK LOG                         0                         0                0

FOREIGN ARCHIVED LOG                  0                         0                0

7 rows selected.

5.计算flash recovery area已经占用的空间

SQL>  select sum(percent_space_used)*3/100 from v$flash_recovery_area_usage;

SUM(PERCENT_SPACE_USED)*3/100
-----------------------------
                       2.7519

6.查看recovery目录

SQL> show parameter recover;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /oracle/app/fast_recovery_area
db_recovery_file_dest_size           big integer 4182M
db_unrecoverable_scn_tracking        boolean     TRUE
recovery_parallelism                 integer     0

7.转移或清除对应的归档日志

 $ cd /oracle/app/fast_recovery_area/test/archivelog  --test未实例名
 然后选择删除无用的archivelog

我这里因为是用来自我学习的测试环境,所以把归档日志全部删除了:
正式环境请谨慎操作!!!

$ cd /oracle/app/fast_recovery_area/test/archivelog
$ du * -sh --time
0       2022-10-13 10:07        2022_10_11
3.5G    2022-10-13 10:07        2022_10_12
262M    2022-10-13 13:36        2022_10_13
$ rm -rf *

注意:
在删除归档日志后,必须用RMAN维护控制文件,否则空间显示仍然不释放。

8.rman连接

$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Oct 13 14:11:12 2022

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: WIND (DBID=860882744)

9.检查无用的archivelog

RMAN> crosscheck archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=196 device type=DISK
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_140_kndkkw3r_.arc RECID=226994 STAMP=1117889085
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_141_kndklg9l_.arc RECID=226995 STAMP=1117889102
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_142_kndklhrm_.arc RECID=226996 STAMP=1117889103
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_143_kndklk1s_.arc RECID=226997 STAMP=1117889105
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_144_kndklodn_.arc RECID=226998 STAMP=1117889109
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_145_kndklrv5_.arc RECID=226999 STAMP=1117889112
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_146_kndklvxw_.arc RECID=227000 STAMP=1117889116
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_147_kndklz26_.arc RECID=227001 STAMP=1117889119
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_148_kndkm3q0_.arc RECID=227002 STAMP=1117889124
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_149_kndkmhwl_.arc RECID=227003 STAMP=1117889135
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_150_kndkmm2m_.arc RECID=227004 STAMP=1117889139
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_151_kndkmp6q_.arc RECID=227005 STAMP=1117889142
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_152_kndkmsds_.arc RECID=227006 STAMP=1117889145
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_153_kndkmz7o_.arc RECID=227007 STAMP=1117889151
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_154_kndknc7s_.arc RECID=227008 STAMP=1117889163
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_155_knf424c7_.arc RECID=227009 STAMP=1117908036
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_156_knf6bmho_.arc RECID=227010 STAMP=1117910355
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_157_knf6bv2z_.arc RECID=227011 STAMP=1117910363
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_158_knf6bzht_.arc RECID=227012 STAMP=1117910367
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_159_knf6c2hy_.arc RECID=227013 STAMP=1117910370
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_160_knf6c6bo_.arc RECID=227014 STAMP=1117910374
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_161_knf6c98d_.arc RECID=227015 STAMP=1117910377
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_162_knf6cdhb_.arc RECID=227016 STAMP=1117910380
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_163_knf6cpj9_.arc RECID=227017 STAMP=1117910390
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_164_knf6cxj4_.arc RECID=227018 STAMP=1117910398
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_165_knf6g409_.arc RECID=227019 STAMP=1117910468
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_166_knf6hk6l_.arc RECID=227020 STAMP=1117910513
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_167_knf6hqfg_.arc RECID=227021 STAMP=1117910519
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_168_knf6hyp3_.arc RECID=227022 STAMP=1117910526
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_169_knf6jfj0_.arc RECID=227023 STAMP=1117910541
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_170_knf6jz62_.arc RECID=227024 STAMP=1117910559
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_171_knf6k3lo_.arc RECID=227025 STAMP=1117910563
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_172_knf6k9l8_.arc RECID=227026 STAMP=1117910569
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_173_knf6kgnp_.arc RECID=227027 STAMP=1117910574
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_174_knf6kqj3_.arc RECID=227028 STAMP=1117910583
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_175_knf6l5cz_.arc RECID=227029 STAMP=1117910597
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_176_knf6l8kh_.arc RECID=227030 STAMP=1117910600
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_177_knf6lgjc_.arc RECID=227031 STAMP=1117910606
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_178_knf6ll7j_.arc RECID=227032 STAMP=1117910610
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_179_knf6m117_.arc RECID=227033 STAMP=1117910625
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_180_knf6m5p5_.arc RECID=227034 STAMP=1117910629
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_181_knf6mjgt_.arc RECID=227035 STAMP=1117910640
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_182_knf6mqj1_.arc RECID=227036 STAMP=1117910647
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_183_knf6mxvh_.arc RECID=227037 STAMP=1117910654
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_184_knf6ngdr_.arc RECID=227038 STAMP=1117910670
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_185_knf6nnr5_.arc RECID=227039 STAMP=1117910676
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_186_knf6nz2j_.arc RECID=227040 STAMP=1117910687
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_187_knf6o6f3_.arc RECID=227041 STAMP=1117910694
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_188_knf6ot2q_.arc RECID=227042 STAMP=1117910714
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_189_knf6p0b5_.arc RECID=227043 STAMP=1117910720
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_190_knf6p6qs_.arc RECID=227044 STAMP=1117910726
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_191_knf6pcgg_.arc RECID=227045 STAMP=1117910732
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_192_knf6pspp_.arc RECID=227046 STAMP=1117910745
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_193_knf6px78_.arc RECID=227047 STAMP=1117910749
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_194_knf6q0mc_.arc RECID=227048 STAMP=1117910752
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_195_knf6q3wt_.arc RECID=227049 STAMP=1117910755
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_196_knf6qgj8_.arc RECID=227050 STAMP=1117910766
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_197_knf6qvrr_.arc RECID=227051 STAMP=1117910779
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_198_knf6qzll_.arc RECID=227052 STAMP=1117910783
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_199_knf6r30w_.arc RECID=227053 STAMP=1117910787
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_200_knf6r67b_.arc RECID=227054 STAMP=1117910790
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_201_knf6rhjn_.arc RECID=227055 STAMP=1117910799
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_202_knf6sbcl_.arc RECID=227056 STAMP=1117910826
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_203_knf6spfv_.arc RECID=227057 STAMP=1117910838
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_204_knf6t0pp_.arc RECID=227058 STAMP=1117910848
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_205_knf6tf2w_.arc RECID=227059 STAMP=1117910861
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_206_knf6top9_.arc RECID=227060 STAMP=1117910869
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_207_knf6v9j6_.arc RECID=227061 STAMP=1117910889
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_208_knf6vfyl_.arc RECID=227062 STAMP=1117910894
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_209_knf6vms9_.arc RECID=227063 STAMP=1117910899
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_210_knf6w8gw_.arc RECID=227064 STAMP=1117910920
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_211_knf6wpwp_.arc RECID=227065 STAMP=1117910934
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_212_knf6x3tf_.arc RECID=227066 STAMP=1117910947
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_213_knf6xbx7_.arc RECID=227067 STAMP=1117910955
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_214_knf6xrh1_.arc RECID=227068 STAMP=1117910968
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_215_knf6y3p4_.arc RECID=227069 STAMP=1117910979
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_216_knf6y8kn_.arc RECID=227070 STAMP=1117910984
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_217_knf6yb41_.arc RECID=227071 STAMP=1117910986
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_218_knf6yfxs_.arc RECID=227072 STAMP=1117910990
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_219_knf6z2j8_.arc RECID=227073 STAMP=1117911010
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_220_knf6zfgn_.arc RECID=227074 STAMP=1117911021
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_221_knf700jc_.arc RECID=227075 STAMP=1117911040
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_222_knf77wlv_.arc RECID=227076 STAMP=1117911292
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_223_knf7g5lw_.arc RECID=227077 STAMP=1117911493
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_224_knf7m7m2_.arc RECID=227078 STAMP=1117911655
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_225_knfc24md_.arc RECID=227079 STAMP=1117915204
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_226_knfglqmn_.arc RECID=227080 STAMP=1117918807
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_227_knfjdlmn_.arc RECID=227081 STAMP=1117920658
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_228_knfjkkmj_.arc RECID=227082 STAMP=1117920817
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_229_knfjmbmh_.arc RECID=227083 STAMP=1117920874
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_230_knfjodmh_.arc RECID=227084 STAMP=1117920940
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_12/o1_mf_1_231_knfl3fnl_.arc RECID=227085 STAMP=1117922413
validation failed for archived log
archived log file name=/oracle/app/fast_recovery_area/WIND/archivelog/2022_10_13/o1_mf_1_232_kngwq193_.arc RECID=227087 STAMP=

ORA-12514 错误的处理

实在只是一个简单的错误,只是记录下过程。

登录报错:

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Oct 18 00:50:26 2022
Version 19.16.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor


Enter user-name:

查看监听,并没有发现对应的数据库服务:

$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 18-OCT-2022 00:50:39

Copyright (c) 1991, 2022, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                17-OCT-2022 22:38:01
Uptime                    0 days 2 hr. 12 min. 37 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/19.0.0.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/bigtsiys/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.0.0.155)(PORT=1521)))
Services Summary...
Service "+APX" has 1 instance(s).
  Instance "+APX1", status READY, has 1 handler(s) for this service...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_RECO" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
The command completed successfully

原来是数据库没有启动,因此启动之:

$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Oct 18 00:51:07 2022
Version 19.16.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 3.2749E+10 bytes
Fixed Size                 13873784 bytes
Variable Size            3892314112 bytes
Database Buffers         2.8655E+10 bytes
Redo Buffers              187449344 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 19c EE Extreme Perf Release 19.0.0.0.0 - Production
Version 19.16.0.0.0

此时监听中已有注册的服务:

$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 18-OCT-2022 00:51:40

Copyright (c) 1991, 2022, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                17-OCT-2022 22:38:01
Uptime                    0 days 2 hr. 13 min. 38 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/19.0.0.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/bigtsiys/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.0.0.155)(PORT=1521)))
Services Summary...
Service "+APX" has 1 instance(s).
  Instance "+APX1", status READY, has 1 handler(s) for this service...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_RECO" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "DB0921_nrt1mz.sub07290808380.training.oraclevcn.com" has 1 instance(s).
  Instance "DB0921", status READY, has 2 handler(s) for this service...
Service "e92e139443c62209e0539b00000afd03.sub07290808380.training.oraclevcn.com" has 1 instance(s).
  Instance "DB0921", status READY, has 2 handler(s) for this service...
Service "orclpdb1.sub07290808380.training.oraclevcn.com" has 1 instance(s).
  Instance "DB0921", status READY, has 2 handler(s) for this service...
The command completed successfully

登录成功了:

$ ssb

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Oct 18 00:51:45 2022
Version 19.16.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Last Successful login time: Mon Oct 17 2022 23:06:01 +00:00

Connected to:
Oracle Database 19c EE Extreme Perf Release 19.0.0.0.0 - Production
Version 19.16.0.0.0

SQL>

以上是关于ORA-00257 错误处理的主要内容,如果未能解决你的问题,请参考以下文章

ORA-00257: archiver error. Connect internal only, until freed 错误的处理方法

oracle ORA-16038 ORA-00257

ORA-00257 错误处理

关于ORA-00257问题的解决(归档程序错误)

oracle数据库连接时提示ora-00257错误,提示数据库归档日志归档失败

Oracle归档日志满了导致Oracle连接(ORA-00257)报错处理