Friday, March 9, 2012

Error ORA-28056: Writing audit records to Windows Event Log failed

I got a PC which ran out from disk space & Oracle was not working. The error was ORA-28056.
I need to delete all the event log & then reconnect it again. Here you can see what happened & it get resolved.



C:\Documents and Settings\navneet>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 7 15:44:02 2012

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

Enter user-name: /as sysdba
Connected to an idle instance.

SQL> startup
ORA-28056: Writing audit records to Windows Event Log failed
OSD-157797404: Message 157797404 not found; product=RDBMS; facility=SOSD

O/S-Error: (OS 1502) The event log file is full.

SQL> exit
Disconnected


Solution of the Problem :  This was because the Event Viewer log is full and could not log anymore events.
The solution is to clear the event log .To solve this issue follow any of the following steps.

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. To do so
Go to Control Panel --> Administrative Tools --> Event Viewer --> Clear All Events.


2) We can also free a log and start recording new events by overwriting old events. To overwrite events,
Go to Control Panel --> Administrative Tools --> Event Viewer --> on the left side Application/System/Security (as available) Right click --> Properties --> click Overwrite events as needed . 
This ensures that all new events are written to the log, even when the log is full.


3) We can also start logging new events by increasing the maximum log size. To increase the log size,
 Go to Control Panel --> Administrative Tools --> Event Viewer --> on the left side Application/System/Security (as available) Right click --> Properties --> Increase the Maximum log size by typing a bigger value.



After that open the CMD,
write "sqlplus /nolog" and press enter.
Now, write "connect as sysdba", enter the user name, for example, "sys" and the password.
After connect, write "startup".


C:\Documents and Settings\navneet>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 7 15:52:12 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter user-name: /as sysdba

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


SQL> select status from v$instance;

STATUS
------------
STARTED


SQL> alter database mount;

Database altered.


SQL> select status from v$instance;

STATUS
------------
MOUNTED


SQL> alter database open;

Database altered.


SQL> select status from v$instance;

STATUS
------------
OPEN


Njoy!!!!!




Your suggestions and queries are always warm welcomed.



No comments:

Post a Comment