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 force command

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-13-04, 13:09
rvsc36 rvsc36 is offline
Registered User
 
Join Date: Jan 2004
Location: Phoenix, AZ
Posts: 42
db2 force command

Hi,

There is an issue we are having where we are trying to run an off-line backup and due to the fact that the DB2 force application is asynchronous, when the backup command is issued, the force has not completed, therby killing the backup. We have tried to increase the wait time (25 seconds sleep) between the force and the backup start, but keep running into this issue.

Any ideas?? Increase the sleep time to even longer?

Thx
-------------------------------------------------------------------

Script bkup.ksh started at 04:00:06
Backup options passed: db2test TEST
Offline backup assumed.....

Auth Id Application Appl. Application Id DB # of
Name Handle Name Agents
-------- -------------- ---------- ------------------------------ -------- -----
DB2 ibmdb 97 *LOCAL.db2test.0E0912135434 TEST 1
DB2 ibmdb 11 *LOCAL.db2test.0209F2135313 TEST 1
DB2 ibmdb 23 *LOCAL.db2test.0602F2142938 TEST 1
DB2 ibmdb 139 *LOCAL.db2test.0C0E52135434 TEST 1
DB2 ibmdb 57 *LOCAL.db2test.0A0A12135352 TEST 1
DB2 ibmdb 110 *LOCAL.db2test.040A52135313 TEST 1
DB2 ibmdb 76 *LOCAL.db2test.060632130044 TEST 1
DB2 ibmdb 8 *LOCAL.db2test.000F12130043 TEST 1

____
DB20000I The FORCE APPLICATION command completed successfully.
DB21024I This command is asynchronous and may not be effective immediately.

SQL1611W No data was returned by Database System Monitor. SQLSTATE=00000
Backup for TEST started at 04:00:32
Invalid RC from TSM on TEST - 4
----------------------------------------------------------------------
SQL1224N A database agent could not be started to service a request, or was
terminated as a result of a database system shutdown or a force command.
SQLSTATE=55032

----------------------------------------------------------------------
Reply With Quote
  #2 (permalink)  
Old 08-13-04, 14:06
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Are you getting a connection in the same script and not terminating ?

If you have a connection open, and the corresponding db2 server process if forced off, the client process does not know of this termination ... Hence, the next time it tries to use the db2 process, it terminates abnormally with sql1224n ...

So, in case you are creating a connection, make sure to terminate it before doing the force applns or before backup ...

If you think this is not your problem, just retry the backup command and it should work now




Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 08-13-04, 18:55
rvsc36 rvsc36 is offline
Registered User
 
Join Date: Jan 2004
Location: Phoenix, AZ
Posts: 42
Sathyaram,

I added a db2terminate to the script just after the force command and before the backup command.

It seems to be working okay now. I will do a couple of more tests.

Thanks again!
R
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