DB2 commands

DB2
Sebastian Misiewicz
List of often used DB2 commands.

General

db2 LIST APPLICATION
list all running processes
db2 FORCE APPLICATION ALL
stop all running processes
db2 ? sql0418
check DB2 error code

418

error code
db2 RESTART DATABASE test USER user USING password
restart a database

test

database name

user

user to execute the action

password

password of given user

Backup

db2move test EXPORT -sn schema
export data from schema

test

database name

schema

name of schema, which exists in the given database
db2move test LOAD
load data to database (from current folder)

test

database name

db2text

db2text CONTROL LIST ALL LOCKS FOR DATABASE test
check locks on text indexes

test

database name
db2text CONTROL CLEAR ALL LOCKS FOR DATABASE test
clear locks on text indexes

test

database name