2014년 2월 20일 목요일

[Oracle] Oracle Architecture - SGA

Oracle Database Architecture

※ Create SGA and Administration


1. You connect Oracle server and command 'startup' in Oracle.
2. Then first server process is search a parameter in pfile or spfile.
3. And request to OS kernel. then SGA size is SGA_MAX_SIZE parameter in pfile.
4. OS Kernel is allocate shared memory. On the basis of the value of the semaphore, to manage the SGA.
5. Server process is make instance in shared memory.
6. You can start work in database.


※ What is mean semaphore??

SGA is use shared memory. It is a space in which multiple server processes to use, there is a possibility that multiple processes access to one block. Maybe multiple processes access to one block, it is make problem like kernel panic. So the kernel must be managed to be able to connect only a one process in one block. Kernel to be able to manage such, semaphore is used to display the usage of block.

2014년 2월 16일 일요일

[Oracle] ORA-00845 Error report

Oracle database installed on Linus OS..

so i was command 'startup' on connected Oracle database 11g

but can not startup on database and show error message

"ORA-00845 : memory_target not supported on this system"

★ what is this error message on Oracle?
- cause
  → this is encountered in Oracle Database 11g ans 12c new feature. Set MEMORY_TARGET,MEMORY_TARGET_MAX for use AMM(Automatic Memory Management) feature then you can show this message.
1. Linux system default /dev/shm used 50% on memory. MEMORY_TARGET,MEMORY_TARGET_MAX less then shared memory size
2. shared memory do not mapping /dev/shm mount-point

- how to..
  → this problem is resetting /dev/shm.
   ☞ unmount /dev/shm and mount /dev/shm
[root@orcl ~]# umount /dev/shm
[root@orcl ~]# mount -t tmpfs shmfs -o size=2g /dev/shm
   ☞ configure /etc/fstab file
[root@orcl ~]# vi /etc/fstab
tmpfs                   /dev/shm                tmpfs   size=2g        0 0 => configure
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

  ☞ reboot system
[root@orcl ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       9.7G  4.1G  5.1G  45% /
tmpfs           2.0G  252M  1.8G  13% /dev/shm 
/dev/sda7        21G  5.7G   14G  30% /app
/dev/sda1       194M   50M  135M  27% /boot
/dev/sda2        13G  4.6G  7.4G  39% /home
/dev/sda5       4.9G  2.2G  2.4G  49% /var

- startup database
SQL> startup
ORACLE instance started.

Total System Global Area  422670336 bytes
Fixed Size                  1336960 bytes
Variable Size             255854976 bytes
Database Buffers          159383552 bytes
Redo Buffers                6094848 bytes
Database mounted.
Database opened.
SQL>