TSM v7 DB recovery errors

gernthefish

ADSM.ORG Member
Joined
Mar 3, 2005
Messages
139
Reaction score
0
Points
0
We're testing the TSM recovery process and getting an error. The source and destination servers are both running TSM v7.1.5, but the destination server has a different directory structure and instance owner. I didn't remove the old DB or anything, just ran the following:

/opt/tivoli/tsm/server/bin/dsmserv restore db on=dbdirs tod=05/17/2016 tot=08:00:00

From info I found online, I created a dbdir file which contains the path name for the destination host and I also had to create the source directory on the destination server even though it is not being used for the recovery process. I used a copy of the volhist.out file from 5/17 (from the source server). The recovery ran ok but I got errors when trying to start dsmserv:

ANR0152I Database manager successfully started.
ANR0238E A database recovery task is prohibiting activation of TSMDB1 with sqlcode -1117.
ANR0171I dbiconn.c(1844): Error detected on 0:1, database in evaluation mode.
Segmentation fault (core dumped)

IBM suggested I try the following, but it failed:

[tsma1a@tacoma ~]$ db2stop
06/08/2016 08:29:03 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
[tsma1a@tacoma ~]$ db2start
06/08/2016 08:29:22 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
[tsma1a@tacoma ~]$ db2 "rollforward db TSMDB1 STOP"
SQL1273N An operation reading the logs on database "TSMDB1" cannot continue
because of a missing log file "S0010375.LOG" on database partition "0" and log
stream "0".

Any suggestions? Should I try removing the DB & logs from the destination server and rerun the recovery? Could having a different directory structure and/or instance user be causing these issues?

Thanks
 
Should I try removing the DB & logs from the destination server and rerun the recovery?
Yes.
Could having a different directory structure and/or instance user be causing these issues?
Directory structure, no if you specify the path like you did and activelogdir and archivelogdir in dsmserv.opt are updated.
Instance user, could be an issue, not 100% sure.
 
I tried removing the TSM DB, but got the same DB2 error. Do I need to reinstall TSM?
 
Thanks marclant. I've tried the following...

[tsma1a@tacoma ~]$ db2 rollforward database TSMDB1 complete
SQL1273N An operation reading the logs on database "TSMDB1" cannot continue
because of a missing log file "S0010375.LOG" on database partition "0" and log
stream "0".
[tsma1a@tacoma ~]$ db2 rollforward database TSMDB1 stop
SQL1273N An operation reading the logs on database "TSMDB1" cannot continue
because of a missing log file "S0010375.LOG" on database partition "0" and log
stream "0".
[tsma1a@tacoma ~]$
 
Try just:

Code:
/opt/tivoli/tsm/server/bin/dsmserv restore db on=dbdirs

I tried this, but it's asking for a DB backup I no longer have. I really need to restore to a specific date/time or volume. Unless I can specify a volume name, but don't see this as an option.
 
This makes me frown. TSM would normally ask - by using the command I posted - for the last Full backup.

How can you not have the last full backup?
 
[tsma1a@tacoma ~]$ db2 rollforward database TSMDB1 complete
SQL1273N An operation reading the logs on database "TSMDB1" cannot continue
because of a missing log file "S0010375.LOG" on database partition "0" and log
stream "0".
The technote says to issue this:
Code:
db2 rollforward database TSMDB1 to end of logs and complete
 
The technote says to issue this:
Code:
db2 rollforward database TSMDB1 to end of logs and complete

Tried that too:

[tsma1a@tacoma ~]$ db2start
06/06/2016 11:18:22 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
[tsma1a@tacoma ~]$ db2 rollforward database TSMDB1 complete
SQL1273N An operation reading the logs on database "TSMDB1" cannot continue
because of a missing log file "S0010375.LOG" on database partition "0" and log
stream "0".
[tsma1a@tacoma ~]$ db2 rollforward database TSMDB1 stop
SQL1273N An operation reading the logs on database "TSMDB1" cannot continue
because of a missing log file "S0010375.LOG" on database partition "0" and log
stream "0".
[tsma1a@tacoma ~]$
 
Tried that too:

[tsma1a@tacoma ~]$ db2start
06/06/2016 11:18:22 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
[tsma1a@tacoma ~]$ db2 rollforward database TSMDB1 complete
SQL1273N An operation reading the logs on database "TSMDB1" cannot continue
because of a missing log file "S0010375.LOG" on database partition "0" and log
stream "0".
[tsma1a@tacoma ~]$ db2 rollforward database TSMDB1 stop
SQL1273N An operation reading the logs on database "TSMDB1" cannot continue
because of a missing log file "S0010375.LOG" on database partition "0" and log
stream "0".
[tsma1a@tacoma ~]$
I don't see "db2 rollforward database TSMDB1 to end of logs and complete" in your output.

Also, does S0010375.LOG exist in your archivelogdir?

Also check db2diag.log at the time you try the rollforward.
 
Merclant, I had tried the rollforward command you posted before, but it didn't work.

At IBM's suggestion, I did the following:

Removed the DB from target server.
dsmserv format dbdir=/tsma1a/tsmdb01 activelogsize=8192 activelogdirectory=/tsma1a/tsmlog archlogdirectory=/tsma1a/tsmarchlog
db2 drop db TSMDB1
dsmserv removedb tsmdb01
/opt/tivoli/tsm/server/bin/dsmserv restore db on=dbdirs tod=05/24/2016 tot=08:00:00

But still can't start TSM:

[tsma1a@tacoma ~]$ dsmserv
ANR7800I DSMSERV generated at 21:19:47 on Mar 8 2016.

IBM Tivoli Storage Manager for Linux/x86_64
Version 7, Release 1, Level 5.000

Licensed Materials - Property of IBM

(C) Copyright IBM Corporation 1990, 2016.
All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corporation.

ANR7801I Subsystem process ID is 30462.
ANR0900I Processing options file /tsma1a/db2home/dsmserv.opt.
ANR0010W Unable to open message catalog for language en_US.UTF-8. The default language message catalog will be used.
ANR7814I Using instance directory /tsma1a/db2home.
ANR4726I The ICC support module has been loaded.
ANR0990I Server restart-recovery in progress.
ANR0238E A database recovery task is prohibiting activation of TSMDB1 with sqlcode -1117.
ANR0171I dbiconn.c(1844): Error detected on 0:1, database in evaluation mode.
[tsma1a@tacoma ~]$

Also tried...

[tsma1a@tacoma ~]$ db2 rollforward database TSMDB1 to end of logs and complete
SQL4971N Roll-forward recovery on database "TSMDB1" on node "0" failed
previously while stopping. Roll-forward recovery must be stopped.
[tsma1a@tacoma ~]$
 
This has been resolved. I was able to recover using the following commands:

  • db2 drop db TSMDB1
    dsmserv removedb tsmdb01
    db2stop
    db2set DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON
    db2start
    dsmserv format dbdir=/tsma1a/tsmdb01 activelogsize=8192 activelogdirectory=/tsma1a/tsmlog archlogdirectory=/tsma1a/tsmarchlog
    /opt/tivoli/tsm/server/bin/dsmserv restore db on=dbdirs activelogdir=/tsma1a/tsmlog tod=05/24/2016 tot=08:00:00
 
Back
Top