C:\Documents and Settings\Administrator>set ORACLE_SID=orcl
C:\Documents and Settings\Administrator>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期一 8月 23 08:19:34 2010
Copyright © 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-28056: Writing audit records to Windows Event Log failed
ORA-28056: Writing audit records to Windows Event Log failed

请输入用户名: eirc
输入口令:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
进程 ID: 0
会话 ID: 0 ***: 0

SP2-0157: 在 3 次尝试之后无法连接到 ORACLE, 退出 SQL*Plus
原因:写入audit到Windows 事件日志失败,Writing audit records to Windows Event Log failed,没有办法写入ENVENTLOG日志造成的
处理过程:

  1. 打开windows 事件查看器,
    提示报错:事件日志服务不可用请验证服务器是否在运行
  2. 右击计算机图标,打开“管理”窗口。
    ORA-28056 Writing audit records to Windows Event Log failed
  3. 依次打开计算机管理,服务和应用程序,服务。
    ORA-28056 Writing audit records to Windows Event Log failed
  4. 在服务中找到Windows Event Log 服务,双击打开它。
    ORA-28056 Writing audit records to Windows Event Log failed
  5. 将Windows Event Log 服务启动类型改为“自动”。
    ORA-28056 Writing audit records to Windows Event Log failed
  6. 点击“服务状态”中的“启动”。
    ORA-28056 Writing audit records to Windows Event Log failed
  7. 依次打开计算机管理,事件查看器可以查看电脑日志。
    ORA-28056 Writing audit records to Windows Event Log failed
    8、再次打开正常
    C:\Documents and Settings\Administrator>sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on 星期一 8月 23 08:31:03 2010
    Copyright © 1982, 2010, Oracle. All rights reserved.
    已连接到空闲例程。
    SQL> startup;
    ORACLE 例程已经启动。
    Total System Global Area 535662592 bytes
    Fixed Size 1375792 bytes
    Variable Size 243270096 bytes
    Database Buffers 285212672 bytes
    Redo Buffers 5804032 bytes
    数据库装载完毕。
    数据库已经打开。
    SQL>

扩展:
如时间查看器能打开,需将应用程序日志清理一下,重新连接数据库,连接成功。启动数据库,启动正常。解决这个问题的时候经过了多次的尝试都失败了,开始想到可能是系统日志的问题了,但没想到是日志满了,最后突然想到这个问题,试了一下,成功了。
ORA-28056 Writing audit records to Windows Event Log failed
ORA-28056 Writing audit records to Windows Event Log failed
C:\Documents and Settings\Administrator>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期一 8月 23 08:31:03 2010
Copyright © 1982, 2010, Oracle. All rights reserved.
已连接到空闲例程。
SQL> startup;
ORACLE 例程已经启动。
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 243270096 bytes
Database Buffers 285212672 bytes
Redo Buffers 5804032 bytes
数据库装载完毕。
数据库已经打开。
SQL>

相关文章: