Search This Blog

Wednesday, November 10, 2010

ORA-00845: MEMORY_TARGET not supported on this system

SQL> STARTUP
ORA-00845: MEMORY_TARGET not supported on this system
Cause of the Problem
-Starting from Oracle 11g the automatic memory management feature is now defined with parameter MEMORY_TARGET and MEMMORY_MAX_TARGET.
-On linux file system the shared memory need to be mounted on /dev/shm directory on the operating system.
-And the size of /dev/shm needs to be greater than MEMORY_TARGET or MEMMORY_MAX_TARGET.
-The AMM (Automatic Memory Management) now in 11g manages both SGA and PGA together by MMAN process.
-The MEMORY_TARGET parameter in 11g comes for (SGA_TARGET+PGA_AGGREGATE_TARGET) which was in 10g.
-And MEMORY_MAX_TARGET parameter in 11g comes instead of SGA_MAX_TARGET parameter which was in 10g.
-The ORA-00845:can arises for the following two reasons on linux system.
1)If the shared memory which is mapped to /dev/shm directory is less than the size of MEMORY_TARGET or MEMORY_MAX_TARGET.
or,
2)If the shared memory is not mapped to /dev/shm directory.

Solution 
Make sure /dev/shm is properly mounted. You can see it by,
df -h
The output should be similar like
$ df -k
Filesystem            Size  Used Avail Use% Mounted on

shmfs                 3G    1000M 1000M  50% /dev/shm
We see here for /dev/shm we have assigned 3G memory. Now if you set MEMORY_TARGET more than 3G then above ORA-845 will arise.
For example if you have MEMORY_TARGET or MEMORY_MAX_TARGET set to 3G then you can mount shared memory to 3G like below.
As a root user,
# mount -t tmpfs shmfs -o size=3g /dev/shm
In order to make the settings persistence so that it will affect after restarting machine add an entry in /etc/fstab similar to the following:
shmfs /dev/shm tmpfs size=3g 0

Tuesday, November 9, 2010

Can not connect to Oracle 11g from TOAD but SQLPLUS is can

If you have set the SEC_CASE_SENSITIVE_LOGON parameter to true, then the database expects "case sensitive" passwords. TOAD somehow seems to convert the passwords to uppercase before logon.

Workarounds: 

1) Set your password in the database to UPPER case -- or --
2) Set SEC_CASE_SENSITIVE_LOGON parameter to false.

Monday, November 1, 2010

Linux Hard Disk Format Command

here are total 4 steps involved for hard disk upgrade and installation procedure:

Step #1 : Partition the new disk using fdisk command

Following command will list all detected hard disks:
# fdisk -l | grep '^Disk'
Output:

Disk /dev/sda: 251.0 GB, 251000193024 bytes
Disk /dev/sdb: 251.0 GB, 251000193024 bytes

A device name refers to the entire hard disk. For more information see Linux partition naming convention and IDE drive mappings.
To partition the disk - /dev/sdb, enter:
# fdisk /dev/sdb
The basic fdisk commands you need are:
  • m - print help
  • p - print the partition table
  • n - create a new partition
  • d - delete a partition
  • q - quit without saving changes
  • - write the new partition table and exit

Step#2 : Format the new disk using mkfs.ext3 command

To format Linux partitions using ext2fs on the new disk:
# mkfs.ext3 /dev/sdb1

Step#3 : Mount the new disk using mount command

First create a mount point /disk1 and use mount command to mount /dev/sdb1, enter:
# mkdir /disk1
# mount /dev/sdb1 /disk1
# df -H

Step#4 : Update /etc/fstab file

Open /etc/fstab file, enter:
# vi /etc/fstab
Append as follows:

/dev/sdb1               /disk1           ext3    defaults        1 2

Save and close the file.

Task: Label the partition

You can label the partition using e2label. For example, if you want to label the new partition /backup, enter
# e2label /dev/sdb1 /backup
You can use label name insted of partition name to mount disk using /etc/fstab:
LABEL=/backup /disk1 ext3 defaults 1 2
Related Posts with Thumbnails