Friday, March 30, 2012

Checking operating system version: must be 5.0, 5.1, 5.2 or 6.0 . Actual 6.1 Failed

Today i got error while installing oracle on Windows server 2008 R2
When i clicked on "setup.exe" file, it throws an error as below:





Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be 5.0, 5.1, 5.2 or 6.0 . Actual 6.1

Failed <<<<

Exiting Oracle Universal Installer, log for this session can be found at C:\Prog
ram Files\Oracle\Inventory\logs\installActions2012-03-30_09-25-48AM.log

Please press Enter to exit...





After too much research i came to know that I need to modify the "oraparam.ini" file which
is placed with Oracle setup files.


I modify the Oraparam.ini file located here
"database\install\oraparam.ini"


Just add those words which are bold as below in the oraparam.ini file.

[Certified Versions]
# You can customise error message shown for failure, provide value for
CERTIFIED_VERSION_FAILURE_MESSAGE
Windows = 5.0,5.1,5.2,6.0,6.1



[Windows-6.1-required]
# Minimum display colours for OUI to run
MIN_DISPLAY_COLORS = 256
# Minimum CPU speed required for OUI
# CPU = 300



Save the oraparam.ini file & then run setup again. Now all goes fine & got the oracle installed.



Your suggestions and queries are always warm welcomed.

Thursday, March 29, 2012

Enabling Archivelog Mode in Oracle 11g

To set archive log, always login through SYSDBA


Now, lets check the current log mode either in "Archivelog" or "Noarchivelog":

C:\Documents and Settings\navneet>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 27 11:19:53 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> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2296
Current log sequence 2299


OR


SQL> select log_mode from v$database;

LOG_MODE
------------
NOARCHIVELOG

We have checked that our Database is in "NOARCHIVE LOG". Below query will set the location where to save the archive logs.

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=E:\ARCHIVE_LOG' SCOPE=SPFILE;

System altered.


SQL> SHUTDOWN IMMEDIATE
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT
ORACLE instance started.

Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 385876432 bytes
Database Buffers 142606336 bytes
Redo Buffers 5804032 bytes
Database mounted.

The below query will make database into archivelog.
SQL> ALTER DATABASE ARCHIVELOG;

Database altered.



SQL> ALTER DATABASE OPEN;

Database altered.


SQL> SELECT LOG_MODE FROM V$DATABASE;

LOG_MODE
------------
ARCHIVELOG


OR


SQL> ARCHIVE LOG LIST
Database log mode Archive Mode
Automatic archival Enabled
Archive destination E:\ARCHIVE_LOG
Oldest online log sequence 2296
Next log sequence to archive 2299
Current log sequence 2299


SQL> alter system switch logfile;



Now database is in Archivelog mode, We have verified by checking archivelogs in directory.


E:\>dir
Volume in drive E has no label.
Volume Serial Number is AA1B-C0B9

Directory of E:\

12/09/2011 09:15 AM app
03/27/2012 11:43 AM 13,952,512 ARCHIVE_LOG2ARC0000002299_0769427405.0001
03/27/2012 11:46 AM 1,536 ARCHIVE_LOG2ARC0000002300_0769427405.0001
03/28/2012 05:39 AM 50,630,144 ARCHIVE_LOG2ARC0000002301_0769427405.0001
03/29/2012 05:38 AM 40,771,072 ARCHIVE_LOG2ARC0000002302_0769427405.0001
03/29/2012 06:30 PM 40,671,232 ARCHIVE_LOG2ARC0000002303_0769427405.0001
02/17/2009 11:33 AM 23,516,968 SkypeSetupFull.exe
6 File(s) 169,543,464 bytes
1 Dir(s) 38,746,923,008 bytes free



Your suggestions and queries are always warm welcomed.

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.