Re: Really basic DB2 question

From: Grant Allen <>
Date: Tue, 17 Mar 2009 09:41:33 +1100
Message-ID: <> wrote:
> We have an old DB2 database that's been kept for occasional querying.
> The primary DBA left the company years ago and the secondary DBA is out
> on disability recovering from surgery.
> The server is being moved and as the only DBA left from that era it's
> fallen in my lap to stop the database before the move and start it
> afterwards.
> I have all the passwords and have done some minimal querying over the
> years but I've never shut down or started up a DB2 database in my life.
> I've googled around a bit and what I've come up with is:
> STOP DATABASE (databasename)
> START DATABASE (databasename)
> Is there anything else? Perhaps an equivalent of the oracle listener?
> I've also seen the command STOP DDF but am uncertain if this is
> something we're running. ps -ef|grep -i ddf doesn't return anything.
> Any advice from someone who knows what they're doing would be
> appreciated :).


Welcome to the dark side ;-) You'll probably be more interested in the commands to start and stop the DB2 instance, and the DAS (administration instance), rather than just stop/quiesce a database. From your Unix/Linux command line, as the instance owner, use "db2stop" to stop the regular instance, and "db2admin stop" to stop the DAS. Jared is right, running "force applications all" interactively, or "db2 force applications all" from the Unix/Linux prompt as the instance owner or SYSADMIN class user will terminate all current sessions - similar to alter session kill "sid, serial#" across all connections in Oracle.

To start them up again, "db2start" and "db2admin start" are your friends.

There's no separate listener process, this is handled by a process or thread (depending on your version #) under the control of the instance itself, so no separate start or stop commands for this required.

There are a world of other commands that can help, and there's also the GUI Control Centre (if you're server has a GUI environment, try running db2cc to launch it). You might have this installed on linux or windows client too.

<shameless author plug> You might find Beginning DB2: From Novice to Professional (Apress) a handy reference, and it's a hardback, so you can always beat the DB2 host with it if it's giving you grief :-) </shameless author plug>

Let me know if you have other questions.


Dazed and confused about technology for 20 years
Received on Mon Mar 16 2009 - 17:41:33 CDT

Original text of this message