Tuesday, April 30, 2019

ORA-27125: unable to create shared memory segment during startup

Problem

After reboot, unable to startup Oracle 12c database instance (Red Hat Enterprise Server 7.6)

ORA-27125: unable to create shared memory segment
Linux-x86_64 Error: 28: No space left on device
Additional information: 3822
Additional information: 6157238272

Solution

Verify OS kernel.shmall memory setting.

1. Get current value 
cat /proc/sys/kernel/shmall
1677722

This seems to be too high..

2. Determine page size
getconf PAGE_SIZE
4096

3. Calculate recommended value for shmall

shmall = <total size of SGA>/<page size>

In our case, we have 16GB RAM, so, shmall = 16 * 1024 * 1024 * 1024 / 4096 = 4194304

4. Update /etc/sysctl.conf
vi /etc/sysctl.conf
kernel.shmall=4194304
sudo sysctl -p

5. Verify  kernel.shmall again
cat /proc/sys/kernel/shmall
4194304

6. Start Oracle instance
sudo su - oracle
sqlplus / as sysdba
startup;

This of course leads to another error..


References


Formula to set proper values for max processes, sessions and transactions in Oracle

Problem

Need to adjust max number of sessions in Oracle DB.

Solution

Standard formula looks like:

PROCESSES = Operating System Dependant
SESSIONS = (1.1 * PROCESSES) + 5
TRANSACTIONS = 1.1 * SESSIONS

alter system set sessions=1000 scope=spfile;
alter system set processes=905 scope=spfile;
alter system set transactions=1100 scope=spfile;

shutdown immediate;
startup;

Wednesday, April 24, 2019

How to get external IP for Linux VMs on Azure

Problem

How to get external IP for Linux VMs on Azure

Solution

dig +short myip.opendns.com @resolver1.opendns.com 

Change mount point for /mnt folder in Ubuntu Linux on Azure

Problem

When provisioning Linux VMs on Azure, /mnt folder is automatically created and pointed to Resource Disk. In some case, we need to have more fine-grained control over /mnt folder (for instance for backward compatibility) and map Resource Disk to its sub-folder, e.g. /mnt/tmp

Solution

Azure provides fantastic support for Linux VMs called Microsoft Azure Linux Agent.

sudo service waagent restart
vi /etc/waagent.conf 
# Mount point for the resource disk
ResourceDisk.MountPoint=/mnt/resources 

 Restart waagent service

 sudo service waagent restart

Install telnet client from command line on Windows Server

Problem

Need to install telnet client on Windows Server 2012, 2016

Solution

pkgmgr /iu:”TelnetClient”

Tuesday, February 26, 2013

Rhino.Mocks WhenCalled() throws exception "Method requires a return value or an exception to throw"

When using of WhenCalled, you should also specify Return statement at the end. More details here.




Sunday, September 16, 2012

Copy maven dependencies to WEB-INF/lib

Use Case

Configure Dynamic Web Project in Eclipse to copy maven dependencies (jars) to WEB-INF/lib.

Solution

1. Update eclipse.ini, specify -vm option

-vm
C:\Program Files\Java\jdk1.6.0_25\bin\

2. Convert project to MAVEN backed, set packaging to WAR.

3. Configure JRE
Go to Project > Properties > Java Build Path > Libraries. Choose JRE System Library and click 'Edit'. Choose Execution Environment from list of available environments, use the same vm as eclipse.ini has.

4. Configure Deployment Assembly
Go to Project > Properties > Deployment Assembly. Click Add button, then choose Java Build Path Entries. Choose Maven Dependencies from the list and click OK.