2010年8月11号--Oracle错误之ORA-28056

2010年8月11号--Oracle错误之ORA-28056
今天正在调试程序突然跳出错误,说TNS之类的错误,也没细看,一看TNS就知道是数据库出了问题,就过来搞,结果是出现如标题所示的错误,后来启动图形化界面发现说是writting log to windows event wrong什么的,当时想到了可能是日志文件满了,但也不确定就在网上找寻方案,最后还真是这个问题,oracle用的不熟,很多小问题都要耽误很长时间,崩溃,慢慢成长中。。。

原文链接:http://space.itpub.net/14326958/viewspace-616119

报错内容:
D:\>sqlplus /nolog

SQL*Plus: Release 11.1.0.7.0 - Production on 星期四 10月 8 20:03:50 2009

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

SQL> conn /as sysdba
ERROR:
ORA-28056: Writing audit records to Windows Event Log failed
OSD-1627319533: Message 1627319533 not found;  product=RDBMS; facility=SOSD
O/S-Error: (OS 1502) ??????????????????
ORA-28056: Writing audit records to Windows Event Log failed
OSD-1627319533: Message 1627319533 not found;  product=RDBMS; facility=SOSD
O/S-Error: (OS 1502) ??????????????????
解决过程:
打开windows 事件查看器,将应用程序日志清理一下,重新连接数据库,连接成功。启动数据库,启动正常。
解决这个问题的时候经过了多次的尝试都失败了,开始想到可能是系统日志的问题了,但没想到是日志满了,最后突然想到这个问题,试了一下,成功了。

论坛上有个哥们给了个很好的回复,以下是他的回复:

回复 #1 jiayuping 的帖子

Subject: Connect As Sysdba Fails With ORA-28056
  Doc ID: 784068.1 Type:  PROBLEM
  Modified Date:  20-MAR-2009 Status:  MODERATED

Applies to:
Oracle Server - Personal Edition - Version: 11.1.0.6 to 11.1.0.7
This problem can occur on any platform.

Symptoms

connect as sysdba fails with:
ORA-28056: Writing audit records to Windows Event Log failed.

Cause
Event Viewer log is full and not able to log anymore events.

Justified by unpublished Bug.6823281 ORA-28056 WRITING AUDIT RECORDS TO WINDOWS EVENT LOG FAILED

which was closed as not a bug.

Solution
Try doing the following using Event Viewer:
.
To open Event Viewer, click Start, click Control Panel,
click Performance and Maintenance, click Administrative Tools,
and then double-click Event Viewer.
.
You must be logged on as an administrator or a member of the
Administrators group to free an event log.
.
1) When a log is full, it stops recording new events. Clearing the log
is one way to free the log and start recording new events.
.
2) You can also free a log and start recording new events by overwriting
old events. To overwrite events, on the Action menu, click Properties,
and then click Overwrite events as needed. This ensures that all new
events are written to the log, even when the log is full.
.
3) You can also start logging new events by increasing the maximum
log size. To increase the log size, on the Action menu, click Properties,
and then increase the Maximum log size.


虽然是在我解决了问题后才看到他的回复,但是不管怎样要谢谢viadeazhu小V,他的解答很精彩。

http://www.itpub.net/viewthread.php?tid=1223832&pid=14374110&page=1&extra=#pid14374110

还有一点就是:如果以后再遇到windows方面的错误信息,可以查询详细信息:
入,在命令行输入:c:\>net helpmsg 1502
输出:事件日志文件已满。
那么看到这个信息就知道解决方案了:
控制面板->管理工具->事件查看器
找到“系统”,然后右键“清除所有事件”,这样就解决了问题;
后来由于程序测试原因又遇到了这个问题,同样执行后还是不行,只能用oracle 的DataBaseConfigurationAssistant 删除了原来的数据库,然后从新建,这样问题解决了,但是显然不是一个决绝问题的方案。
暂时解决问题,就先这样儿吧,程序还有很多事情要做。
续:2010年8月27号
这几天也遇到一些问题原因也是因为日志文件写满造成的,发现只要每次利用orcle提供能干的继承工具DataBase Configuration Assistant 和 Net Configuration Assistant来进行一次设置就会发现问题的真正所在,这样就可以搞好,这几天的问题一般都是因为日志文件写满造成的,解决办法就是将日志文件清空。

你可能感兴趣的:(oracle,windows,.net,SQL Server,OS)