RE: Really basic DB2 question

From: Bancea, Danut (FIN) <"Bancea,>
Date: Tue, 17 Mar 2009 08:54:08 -0400
Message-ID: <168189368747BC4CAF81DA223237F0AE062D1477_at_CTSPITDCEMMVX08.cihs.ad.gov.on.ca>



Hi Jay,

You also can use "db2stop force" to stop the instance and kill all the database connections at the same time.

Here are some other useful commands:

At the database level you can quiesce/unquiesce the database

db2 "quiesce dbname immediate" - it is like shutdown immediate db2 "unquiesce dbname"

To kill a database connection:

db2 "list application"

db2 "force application (Appl.Handle1, Appl.Handle2)"

Link to the DB2 Info center:

http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/co m.ibm.db2.luw.admin.cmd.doc/doc/r0001940.html

There are two types of commands:

CLP commands - for catalog db, backup, restore, update database/instance parameters...

DB2 OS commands - system commands for : db2stop, db2start, db2look, ...

Danut,

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Grant Allen Sent: March 16, 2009 6:42 PM
To: Jay.Miller_at_tdameritrade.com
Cc: oracle-l_at_freelists.org
Subject: Re: Really basic DB2 question

Jay.Miller_at_tdameritrade.com 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)
> STOP DB2 MODE (QUIESCE)
>
> START DATABASE (databasename)
> START DB2
>
> 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 :).

Jay,

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.

Ciao
Fuzzy
:-)



Dazed and confused about technology for 20 years http://fuzzydata.wordpress.com/
--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 17 2009 - 07:54:08 CDT

Original text of this message