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 > DB2 DataBase Autometically disconneting after 30 mins

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-23-11, 07:34
siddhu.pandu0854 siddhu.pandu0854 is offline
Registered User
 
Join Date: Nov 2011
Posts: 43
Red face DB2 DataBase Autometically disconneting after 30 mins

Hi all

Thanks in advance

I have a small problem am connecting to my database normally but after 30 mins its disconnecting autometically if i didnot work on that database. but , i want continuos connection to that DB (because am testing the automatic maintenance on this database). Pls suggest me how to over come this situation or pls tell me how to set the cron job to connect the database every 25 mins with example code.

DB2 V9.7.3
AIX 6.1


Thanks & Regards
Siddhu.Pandu
Reply With Quote
  #2 (permalink)  
Old 11-23-11, 09:09
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Why not just ACTIVATE the database?

Andy
Reply With Quote
  #3 (permalink)  
Old 11-23-11, 10:09
siddhu.pandu0854 siddhu.pandu0854 is offline
Registered User
 
Join Date: Nov 2011
Posts: 43
andy am trying to do that but it says like this
SQL1493N The application is already connected to an active database.
db2 ? SQL1493N


SQL1493N The application is already connected to an active database.

Explanation:

The ACTIVATE DATABASE and DEACTIVATE DATABASE commands cannot proceed
because the application is already connected to a database.

User response:

Disconnect from the database then re-submit the command.

Andy pls tell me what is the difference between connect and activate db commands
Thanks and Regards
Siddhu
Reply With Quote
  #4 (permalink)  
Old 11-23-11, 10:24
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
A database is either Active or Inactive. If it is Inactive, it is not taking up resources (memory) on the server and no one is accessing the data. A database can become active by one of two ways. Either the ACTIVATE database command is issued, or when the first connection occurs. When a database becomes active, all of the heaps and bufferpools are allocated. This can take some time, which maybe undesirable when connecting to the database for the first time. The ACTIVATE DATABASE command will bring up the database and allocating heaps and buffperpools so that the connections do not experience the delay of bringing up the database if it is the first connection. If a database have been ACTIVATEd, it will remain active even when the last connection ends.

Andy
Reply With Quote
  #5 (permalink)  
Old 11-23-11, 10:45
siddhu.pandu0854 siddhu.pandu0854 is offline
Registered User
 
Join Date: Nov 2011
Posts: 43
Thanks and ANDY Thanks you very much

i activated the database but at this time also my databse getting disconnected after completion of 30 mins pls tell me how to over come this situation


Thanks and Regards
siddhu
Reply With Quote
  #6 (permalink)  
Old 11-23-11, 11:02
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Can you elaborate on just what is happening? Are you saying that you successfully issued ACTIVATE DATABASE and then 30 minutes later it is no longer activated without any further activity?

Andy
Reply With Quote
  #7 (permalink)  
Old 11-23-11, 12:23
db2mtrk db2mtrk is offline
Registered User
 
Join Date: Nov 2011
Posts: 27
is there any errors or warnnings in the diag.log ?
have you checked ?
Reply With Quote
  #8 (permalink)  
Old 11-24-11, 03:32
Mathew_paul Mathew_paul is offline
Registered User
 
Join Date: Oct 2007
Posts: 200
Quote:
Originally Posted by siddhu.pandu0854 View Post
andy am trying to do that but it says like this
SQL1493N The application is already connected to an active database.
db2 ? SQL1493N


SQL1493N The application is already connected to an active database.

Explanation:

The ACTIVATE DATABASE and DEACTIVATE DATABASE commands cannot proceed
because the application is already connected to a database.

User response:

Disconnect from the database then re-submit the command.

Andy pls tell me what is the difference between connect and activate db commands
Thanks and Regards
Siddhu
the error says tht ur already connected to db its not disconneted, when u doubt tht ur disconneted execute this command and chk

get connection state
Reply With Quote
  #9 (permalink)  
Old 11-24-11, 06:08
siddhu.pandu0854 siddhu.pandu0854 is offline
Registered User
 
Join Date: Nov 2011
Posts: 43
Hi all

There is no error msgs in diag.log file. Actulally what happpnening is
db2 connect to <db-name> working normally without any errors and warnings also am working on this db properly without any problem. main problem is if i will not work on this db upto 30 mins then its going to disconnected when am continue the work then its in connected state only.

am getting following msg then disconnected to the database
db200001@kcmstr02>
Shell will time out in 60 seconds.
ksh: Timed out waiting for input.
kcmstr02:/# (Wht does it mean ?)

Here again i have to login to instance to connect the database to work any thing on that . pls guide me to solve this ........


Thanks in advance

Thanks & Regards
siddhu
Reply With Quote
  #10 (permalink)  
Old 11-24-11, 06:21
stiruvee stiruvee is offline
Registered User
 
Join Date: May 2010
Location: India
Posts: 34
The message indicates that you are automatically disconnected from AIX session. It has nothing to do with DB2 session. Go thru following link for details regarding changing timeout settings for AIX session.

AIX V6.1 Remote Login Session Management


Satya....
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