Tuesday, January 6, 2015

Enabling Oracle Large Page jacked up the database.

Trying to enable large page. But Hugepages weren't configured correctly as I thought. Once, I forced the database to use Large Page and bounced the database, it failed to come back up because Oracle database will not fallback to normal startup
if the Use_Large_Page is set to ONLY.

Due to time constraint, the database needs to be brought back up.



ALTER SYSTEM SET use_large_pages=only SCOPE=SPFILE;

<bounced the database>

SQL> startup nomount;
ORA-27125: unable to create shared memory segment
SQL> startup mount;
ORA-27125: unable to create shared memory segment
SQL>


Locate pfile or copy from somewhere else. Modify the parameters as necessary if you do not have a backup of pfile or it is too old.

SQL> startup pfile=initorcl.ora
ORACLE instance started.

Total System Global Area 6413680640 bytes
Fixed Size                  2265224 bytes
Variable Size            4580183928 bytes
Database Buffers         1811939328 bytes
Redo Buffers               19292160 bytes
Database mounted.
Database opened.


SQL> create spfile from pfile;

File created.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 6413680640 bytes
Fixed Size                  2265224 bytes
Variable Size            4580183928 bytes
Database Buffers         1811939328 bytes
Redo Buffers               19292160 bytes
Database mounted.
Database opened.
SQL> show parameter large

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
large_pool_size                      big integer 0
use_large_pages                      string      TRUE

Oracle: Unable to switch user to oracle

[root@iTest ~]# su - oracle
could not open session


Checked the 
ulimit -a 
or 
vi /etc/security/limits.conf

The soft or hard may have been overlocated. 

I was fooling with the parameters and insert 2000000 on both oracle hard nproc and nofile.

# End of file
#oracle hard nproc 16384
#oracle hard nofile 65536

oracle hard nproc 30000
oracle hard nofile 100000


Change it to lower number and run this as root.

sysctl -p