If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > deactive /reactive database??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-27-04, 10:44
yy707 yy707 is offline
Registered User
 
Join Date: Jul 2004
Posts: 1
Question deactive /reactive database??

Hi there,

I am a beginner in DB2 though I had a few years experience in other RDMS. Some senario in DB2 is really confusing me here.
when I was asked to do a offline backup of DB2 database, I forced all applications off, then I issued 'deactive database db1' command. it gives me some messages like 'the command is successful, but the database is not active'. then I list application again, I found some connections again!
so my first question is Why after the deactive database, users can still connect to the database?

Then I forced applications off again. and deactive database again. then I iissued the command backup database .... it looks okay.
so I terminated my connection.
then I run db2, then I typed connect db1, then it looks like I got connected??
if that is case, that's the command of activate database doing?

Anyone can give me some explanation? Thank you!
Reply With Quote
  #2 (permalink)  
Old 07-27-04, 11:25
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
When the activate database command is issued, most database resources (especially buffer pools) are allocated regardless of whether there are any connections, and they stay allocated until a deactivate command is issued (or a db2stop is issued).

If no activate is issued, then the first connection causes DB2 resources to be allocated, and they are de-allocated when the last connection is disconnected. In some situation this could cause a lot of allocation and de-allocation of resources causing delays in connecting.

Using the deactivate command does not disconnect users, it just reverts back to the way DB2 allocates resources as if no activate database had ever been issued (relying on the first connection to do the allocation).

If you have DB2 version 8, you should look at the QUIESCE command, otherwise the system command DB2STOP FORCE (or CLI command STOP DBM FORCE) is normally used in front of backups.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On