Nan Xiao's Blog

A system software / performance engineer's home

Month: April 2016

Fix “ORA-03114: not connected to ORACLE” error

I utilize docker-oracle12c to run Oracle in docker, and bind specified CPU and memory:

docker run -d -it --cpuset-cpus=xx-xx,xx-xxx  --cpuset-mems=x,x ... 

All containers run OK but one Oracle database is always created failed, and the error log is:

ORA-03114: not connected to ORACLE

After tough debugging, the reason is the memory on specified NUMA node is not enough:

# numactl -H
node 2 size: 786432 MB
node 2 free: xxxxx MB

node 3 size: 786432 MB
node 3 free: xxxxx MB

The solution is disable HugePages temporarily:

# cat /etc/sysctl.conf
# sysctl -p

After creating database, enable HugePages again:

# cat /etc/sysctl.conf
# sysctl -p


Upgrade Linux kernel on RHEL 7

My OS is RHEL 7.2 (minimal installation version). To use some new kernel features (such as BPF), I need to upgrade kernel to 4.x.

(1) Register the system and apply a subscription:

# subscription-manager register --username <username> --password <password> --auto-attach

(2) Use yum install to install the following software packages:


BTW, when executing yum install perl, it prompts errors, so I download the source code from perl official website, and build it form scratch:

make test
make install

(3) Download the stable kernel from and extract it, then build it:

make menuconfig
make modules_install install

According to your requirement, maybe installing the header files is also need:

make INSTALL_HDR_PATH=/usr/local headers_install

(4) Reboot system, and select right kernel on boot time, enjoy it:

# uname -a
Linux localhost.localdomain 4.5.0 #1 SMP Mon Apr 11 09:56:46 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux


Using unixODBC to connect SAP HANA database

There are 2 methods of installing unixODBC:
(1) Use packages provides by OS vendors, such as:

yum install unixODBC

(2) Download the source code from unixODBC website, and build it:

make install

Please notice: by default, the configuration files are in /etc/unixODBC:

# odbcinst -j
unixODBC 2.3.1
DRIVERS............: /etc/unixODBC/odbcinst.ini
SYSTEM DATA SOURCES: /etc/unixODBC/odbc.ini
FILE DATA SOURCES..: /etc/unixODBC/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8

And this may introduce the following connection error:

# isql HDB system xxxxxx -v
[08S01][unixODBC][SAP AG][LIBODBCHDB SO][HDBODBC] Communication link failure;-10709 Connect failed (no reachable host left)
[ISQL]ERROR: Could not SQLConnect

The solution is either you create a symbol link of /etc/odbc.ini which points to /etc/unixODBC/odbc.ini:

ln -s /etc/unixODBC/odbc.ini /etc/odbc.ini

Or when compiling from source code, specify the sysconfdir option in configuring process:

./configure --sysconfdir=/etc

The odbc.ini file is like this:

Driver = /usr/sap/hdbclient/
servernode = localhost:30015

The 00 in 30015 is the instance number of SAP HANA.

When using isql to connect SAP HANA database, if not provide user name and password, the error message is a little confused:

# isql HDB -v
[08S01][unixODBC][SAP AG][LIBODBCHDB SO][HDBODBC] Communication link failure;-10709 Connection failed (RTE:[-1] Kerberos error. Major: "unspecified [851968]", minor: "No Kerberos credentials available [2529639053/-1765328243]")
[ISQL]ERROR: Could not SQLConnect

But after specifying the user name and password, the connection is OK:

# isql HDB system xxxxxx -v
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |

Connect to HANA with unixODBC fails.


Powered by WordPress & Theme by Anders Norén