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 Archieve log

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-03-11, 01:48
alwayssathya alwayssathya is offline
Registered User
 
Join Date: Aug 2010
Location: Chennai India
Posts: 161
db2 Archieve log

Hi ,

I wanted to restore my DB into another server, in this i have the Backup of the Db and the Archive log files before copying i thought of making the complete transaction finished.

for which i gave

[db2inst1@WESSPITM01 TEPSDB]$ db2 force applications all
DB20000I The FORCE APPLICATION command completed successfully.
DB21024I This command is asynchronous and may not be effective immediately.

[db2inst1@WESSPITM01 TEPSDB]$ db2 archive log for db teps
SQL1493N The application is already connected to an active database.
[db2inst1@WESSPITM01 TEPSDB]$

when i see the application

[db2inst1@WESSPITM01 TEPSDB]$ db2 list applications

Auth Id Application Appl. Application Id DB # of
Name Handle Name Agents
-------- -------------- ---------- -------------------------------------------------------------- -------- -----
DB2INST1 db2bp 27 *LOCAL.db2inst1.110203064046 TEPS 1


This was the error i got... any suggestion on this will be appreciated
Reply With Quote
  #2 (permalink)  
Old 02-03-11, 05:33
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Sorry, I am not sure what your question ... Are you concerned that the connection was not terminated after the force ?
As the command output says, the force command may not be effective immediately and may take a while to force the apps.
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 02-03-11, 14:39
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Anytime I get that error, I just do this to fix it:

db2 terminate
__________________
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
  #4 (permalink)  
Old 02-04-11, 01:53
alwayssathya alwayssathya is offline
Registered User
 
Join Date: Aug 2010
Location: Chennai India
Posts: 161
@sathyaram
you are correct but i want to submit the command to get the logs archived. so how long do i need to wait the force application command
Reply With Quote
  #5 (permalink)  
Old 02-04-11, 01:56
alwayssathya alwayssathya is offline
Registered User
 
Join Date: Aug 2010
Location: Chennai India
Posts: 161
@marcus

db2terminate will disconnect the complete the connection with DB.

but is it possible to submit any command after the disconnection of DB ??
Reply With Quote
  #6 (permalink)  
Old 02-04-11, 07:19
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Depends on the command ..
Commands like backup, restore , archive will not work when a connection to the db is active.

As a rule of thumb, if a command uses name of the database in the command (eg. archive log for db <dbname> ) , then a connection is not required and often, will not work if connected to a db ..

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
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