ORA-00257: archiver error. Connect internal only,
2024-07-21 02:09:42
供稿:网友
环境:winxp+oracle9.2.0.1客户端
win2003+oracle9.2.0.5服务端
一、出错过程:
在客户端执行以下语句:
conn scott/[email protected]
declare
i number;
begin
select s.nextval into i from dual;
while i<1000
loop
insert into b values (i);
end loop;
end;
出现错误,客户端呈假死机现象。
新开一个窗口:
sql> conn scott/[email protected]
已连接。
sql> select sid,serial#,username from v$session;
sid serial# username
--------- --------- ------------------------------
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
11 1
12 14
13 5 scott
14 15 scott
15 4
16 1
17 1
18 1
19 1
20 4 nccwgs
已选择20行。
已用时间: 00: 00: 00.01
sql> alter system kill session '13,5';
系统已更改。
已用时间: 00: 00: 00.00
sql>
重复上面步骤大概3次后,
sql> conn scott/[email protected]
error:
ora-00257: archiver error. connect internal only, until freed.
无法连接数据库。
二、problem description -------------------
the database is running in archive log mode with automatic archiving turned on. when the archive log destination diskspace becomes full the automatic archiving will stop. this is expected to happen. at this point a message should appear on the screen: oracle instance v816 - can not allocate log, archival required when all of the online redo logs are filled up, the database will be in a hang state. after freeing up diskspace the online redo logs are still not archiving. in most cases this is the correct behaviour.
if you attempt to manually archive the files you may receive the following errors:
svrmgr> archive log next ora-16014: log 1 sequence# 199 not archived, no available destinations ora-00312: online log 1 thread 1: 'c:oracleoradatav816redo01.log'
svrmgr> archive log all ora-16020: less destinations available than specified by log_archive_min_succeed_dest
solution description --------------------
some of the possible ways to fix this problem:
1. use the command:
alter system archive log all to 'c:oracleoradatav816archive'; *note: you must specify a location ref - ora-16014
2. shutdown and restart the database. it may be necessary to do a shutdown abort.
3. use the reopen attribute of the log_archive_dest_n init.ora parameter.
log_archive_dest_n='
reopen=30' or run the following comand:
alter system set log_archive_dest_n = 'reopen'
4. use the commands:
alter system archive log stop; alter system archive log start;
explanation -----------
the error ora-16014 is the real clue for this problem. once the archive destination becomes full the location also becomes invalid. normally oracle does not do a recheck to see if space has been made available.
1. using the command: alter system archive log all to 'c:oracleoradatav816archive'; gives oracle a valid location for the archive logs. even after using this the archive log destination parameter is still invalid and automatic achive does not work. this solution is best for systems that do not archive regularly but cannot be shutdown. you can also use this to allow you to do a shutdown immediate instead of shutdown abort.
2. shutdown and restart of the database resets the archive log destinstation parameter to be valid. do not forget to make disk space available before starting the database.
3. use the reopen attribute of the log_archive_dest_n parameter to determine whether and when arcn attempts to re-archive to a failed destination following an error. reopen applies to all errors, not just open errors. reopen=n sets the minimum number of seconds before arcn should try to reopen a failed destination. the default value for n is 300 seconds. a value of 0 is the same as turning off the reopen option, in other words, arcn will not attempt to archive after a failure. if you do not specify the reopen keyword, arcn will never reopen a destination following an error. the server administration guide has more information on reopen.
references ----------
[bug:1271752] automatic archiving has not resumed after space is freed up server administration guide: chapter 7
[note:74324.1] auto archive stopped - 8i log_archive_dest_n issues .
3、问题解决
归档日志使用的磁盘空间已满。删除一些老的磁盘归档文件
sql> shutdown abort;
oracle instance shut down.
sql> startup
oracle instance started.
total system global area 542712360 bytes
fixed size 455208 bytes
variable size 427819008 bytes
database buffers 109051904 bytes
redo buffers 5386240 bytes
database mounted.
database opened.
sql> conn scott/tiger
connected.
sql>