November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

DB2 Basics

How to get a snapshot for DB2 db2 get snapshot for dynamic sql write to file on dbname | tee output.file

or

db2 “select * from table( SNAPSHOT_DYN_SQL( ‘dbname’,-1) as t” [edit]How to check DB2 licence /export/home/ldapdb2/sqllib/adm/db2licm -l [edit]How to get the DB2 version db2level [edit]How to make sure DB2 starts and works with WAS […]

Errors SQL22212N or DBA1177N with DB2 Control Center

Technote (troubleshooting) Problem(Abstract)

DBA1177N and SQL22212N occur when attempting to connect to an instance from the DB2 Control Center

Cause

The DBA1177N message will appear under one of the following conditions:

1. The Tools Catalog Database has not been created.2. The DAS configuration parameters have not been updated.3. The connection failed (SQL22212N) to the Tools […]

DB2 Commands

Start an instance

As an instance owner on the host running db2, issue the following command

$ db2start

Stopping the instance

$ db2stop

Connect to the database as instance owner

$ db2

as a user of the database:

$source ~instance/sqllib/db2cshrc (csh users)

$ . ~instance/sqllib/db2profile (sh users)

$ db2 connect to databasename

[…]

Starting the DB2 control center on Linux

To start the DB2 control center, perform the following steps:

Login as root. At the command line, run the following command: xhost +localhost. Run the following command su – ctginst1. Run the following command db2cc.

db2 tcp ip bindings

Enable DB2 service ports for remote connections.

To enable outside users to get to your DB2 databases, you’ll need to set up the DB2 service port, as it is not configured by the Synaptic installation process.

As the regular user, run sudo vi /etc/services and add this line to the end of the file and […]