IBM Support

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

Troubleshooting


Problem

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

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"DB2 Tools - db2diag.log","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.8;9.7;10.1;10.5;11.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21988027