IBM Support

SQL0293N or SQL0970N with Cannot create /tmp/SQLDIR.LK0 error/warning in db2diag.log

Technote (troubleshooting)


Problem(Abstract)

When performing some operation that involves creation of directories or files the user gets and SQL error like SQL0293N, SQL0970N or similar indicating that the operations cannot be completed.

The /tmp/SQLDIR.LK0 is used to serialize access to the file system when creating directories and files needed for DB2. This mainly happens when creating directories and files for storage containers.

Symptom

SQL0293N or SQL0970N when activating database, creating a tablespace, creating a database, restoring a database


Cause

The permissions in the /tmp directory are not correct

Environment

ALL UNIX platforms

Diagnosing the problem

Commands like activate database, connect to database, create database, restore database will return SQL0293N or SQL0970.


The diag.log will show an error or warning like this:


2016-07-26-08.31.06.641066-420 I57479671E631 LEVEL: Error
PID : 8027 TID : 140387012306688PROC : db2sysc 0
INSTANCE: xxxxxxxx NODE : 000 DB : xxxxxx
APPHDL : 0-7 APPID: *LOCAL.xxxxxx.160726153101
AUTHID : CTGINST1
EDUID : 21 EDUNAME: db2agent (xxxxxxx) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbLockAllDirs, probe:905
MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
DIA8701C Access denied for resource "", operating system return
code
was "".
DATA #1 : <preformatted>
Cannot create /tmp/SQLDIR.LK0

Reviewing the permissions on the /tmp directory will show that it is not 777


Resolving the problem

As root change permissions for the /tmp directory:


chmod 777 /tmp

Related information

SQL0293N

Document information

More support for: DB2 for Linux, UNIX and Windows
DB2 Tools - db2diag.log

Software version: 9.7, 9.8, 10.1, 10.5, 11.1

Operating system(s): AIX, HP-UX, Linux, Solaris

Reference #: 1988027

Modified date: 28 July 2016