1) db2 list applications
db2 get snapshot for applications on <dbname>
2) If you have your monitor switches ON :
a) for dynamic sql : The application snapshot will have the SQL
Statement
b) for static sql(normally used in SPs) : The application snapshot
will tell you the package name and section number. You can use
SYSCAT.PACKAGES and SYSCAT.STATEMENTS to know the SQL Statement
3) Force application all and then do an offline backup .... But, this may
cause a rollback of currently running spplications ... Another point to note
is that the force application is asynchronous ... You can use the script in
http://www.db2click.com/scripts.htm to make sure all apps are forced before
you start an offline backup ..
3a) There is no way at present to wait for the transactions to complete
before shutting down the database ... It should be available hopefully in
one of the future fixpacks, if you are on V8 (The command is QUIESCE
DATABASE .... ) .. The current, QUIESCE TABLESPACE FOR TABLE may not be of
much use in your scneaio ...
3b) db2ckbkp command
3c) I do not know much about dbverify, but , I guess INSPECT command
(available from V8) in db2 is the one with similar functionality ...
Hope this helps
Cheers
Sathyaram
www.db2click.com
-----Original Message-----
From: Thirumaran
[mailto:db2udbdba-ezmlmshield-x95761566.[Email address protected]
Sent: 19 July 2004 17:04
To: LazyDBA Discussion
Subject: Db2 general & backup information
In db2 how do i get
1) The list of users connected / node name /ip address etc.
2) The current sql statemnt executed by a particular user.
3) Before taking an offline backup what are the commands i need to execute .
3.A In oracle we have shutdwon immediate (save and shutdowns) / shutdown
transactional (waits till the user issues commit or rollback then the
database shuts down)
3.B After taking tha back how to find the back is ok ? any commands
3.C how to find the health of the containers. i.e In oracel we have the
command DBverify simillar one in db2
Thanks iN advance
Thiru
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
For additional commands, e-mail: db2udbdba-[Email address protected]
**********************************************************************
This email and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed. This communication represents the originator's personal views and
opinions, which do not necessarily reflect those of HPI Limited. If you are
not the original recipient or the person responsible for delivering the
email to the intended recipient, be advised that you have received this
email in error, and that any use, dissemination, forwarding, printing, or
copying of this email is strictly prohibited. If you received this email in
error, please immediately notify [Email address protected]
This message has been scanned by Panda Anti-Virus. Recipients are advised to
apply their own virus checks to this message on delivery.
**********************************************************************
DB2 & UDB email list listserv db2-l LazyDBA home page