1. 程式人生 > >"ORA-01034: ORACLE not available" resolved

"ORA-01034: ORACLE not available" resolved

文章目錄

Summary

Encountered problem cannot login Oracle by login name and password “system/oracle”, resolved this issue by changed the kernal parameter kernel.sem in sysctl.conf.

Problem

Encountered ORA-01034 and ORA-27101 as below,

[[email protected] ~]$
[[email protected] ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on 星期四 12月 20 20:42:24 2018

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

SQL> show user;
USER 為 ""
SQL> conn system/oracle
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file
or directory 程序 ID: 0 會話 ID: 0 序列號: 0

Can login sys/oracle successful as below,

SQL> conn sys/oracle as sysdba
已連線到空閒例程。
SQL> show user;
USER 為 "SYS"

shutdown and startup command encountered below error,

SQL> shutdown immediate
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file
or directory SQL> startup open ORA-27154: post/wait create failed ORA-27300: OS system dependent operation:semget failed with status: 28 ORA-27301: OS failure message: No space left on device ORA-27302: failure occurred at: sskgpcreates

Solution

Change below kernal parameter,

[[email protected] ~]# vim /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
kernel.shmmax = 536870912
kernel.shmall = 2097152
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
#kernel.sem = 100 128  128
# semaphores: semmsl, semmns, semopm, semmni
#
kernel.sem = 250 32000 100 256

Load the setting,

[[email protected] ~]# sysctl -p
kernel.shmmax = 536870912
kernel.shmall = 2097152
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
kernel.sem = 250 32000 100 256

Try again with successful result,

SQL> startup open
ORACLE 例程已經啟動。

Total System Global Area 1653518336 bytes
Fixed Size		    2213896 bytes
Variable Size		  989857784 bytes
Database Buffers	  654311424 bytes
Redo Buffers		    7135232 bytes
資料庫裝載完畢。
資料庫已經開啟。
SQL> conn system/oracle
已連線。
SQL>
SQL> conn system/oracle
已連線。
SQL> show user;
USER 為 "SYSTEM"
SQL>

Reference

ORA-27154 post/wait create failed