IBM Support

Error 2121 during restore by a different IBM Spectrum Protect server instance owner.

Question & Answer


Question

During the restore of a IBM Spectrum Protect server database to a different IBM Spectrum Protect server instance, using the instance owner associated with that instance, the following error might be reported: Error 2121 collecting the server database creation timestamp. The server stops.

Cause

The following procedure will make the restore fail with the error 2121, tsminst3 is the instance owner of the new target instance, tsm is the instance owner of the original server instance backed up:

[root@plutonium]# groupadd tsmsrvr3
[root@plutonium tsminst3]# adduser -d /home/tsminst3 -m -g tsmsrvr3 -s /bin/bash tsminst3
[root@plutonium tsminst3]# passwd tsminst3
Changing password for user tsminst3.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

Create the database and log directories. Please understand that the configuration of the database and log directories is only for demonstration purpose and not recommended for production servers.
[root@plutonium tsminst3]# chown tsminst3:tsmsrvr3 .
[root@plutonium tsminst3]# ls -al
total 24
drwxr-xr-x 5 tsminst3 tsmsrvr3 4096 Jan 12 07:39 .
drwxr-xr-x 12 root root 4096 Jan 12 07:38 ..
drwxr-xr-x 2 tsminst3 tsmsrvr3 4096 Jan 12 07:39 tsmarchlog
drwxr-xr-x 2 tsminst3 tsmsrvr3 4096 Jan 12 07:38 tsmdb
drwxr-xr-x 2 tsminst3 tsmsrvr3 4096 Jan 12 07:38 tsmlog

login as: tsminst3
tsminst3@machine's password:
[tsminst3@plutonium ~]$ ls -al
total 24
drwxr-xr-x 5 tsminst3 tsmsrvr3 4096 Jan 12 07:39 .
drwxr-xr-x 12 root root 4096 Jan 12 07:38 ..
drwxr-xr-x 2 tsminst3 tsmsrvr3 4096 Jan 12 07:39 tsmarchlog
drwxr-xr-x 2 tsminst3 tsmsrvr3 4096 Jan 12 07:38 tsmdb
drwxr-xr-x 2 tsminst3 tsmsrvr3 4096 Jan 12 07:38 tsmlog
[tsminst3@plutonium ~]$ cd tsmdb
[tsminst3@plutonium tsmdb]$ touch xxx
[tsminst3@plutonium tsmdb]$ rm xxx
[tsminst3@plutonium tsmdb]$ cd ..
[tsminst3@plutonium ~]$ touch .profile
[tsminst3@plutonium ~]$ exit

[root@plutonium tsminst3]# /opt/tivoli/tsm/db2/instance/db2icrt -a SERVER -u tsminst3 tsminst3
DBI1070I Program db2icrt completed successfully.

login as: tsminst3
tsminst3@machine's password:
[tsminst3@plutonium ~]$ mkdir tsminst3
[tsminst3@plutonium ~]$ db2 update dbm cfg using dftdbpath /home/tsminst3/tsminst3
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed successfully.

Edit the userprofile to match your environment
[tsminst3@plutonium ~]$ cd ~/sqllib
[tsminst3@plutonium sqllib]$ cat userprofile
export DSMI_CONFIG=/home/tsminst3/tsminst3/tsmdbmgr.opt
export DSMI_DIR=/opt/tivoli/tsm/client/api/bin64
export DSMI_LOG=/home/tsminst3/tsminst3

Make sure the right server stanza exists:
[root@plutonium ~]# cat /opt/tivoli/tsm/client/api/bin64/dsm.sys
servername TSMDBMGR_TSMINST3
commmethod tcpip
tcpserveraddr localhost
tcpport 1503
passwordaccess generate
passworddir /home/tsminst3/tsminst3
errorlogname /home/tsminst3/tsminst3/tsmdbmgr.log
nodename $$_TSMDBMGR_$$

Configure the server and format the database, then make the server start
[tsminst3@plutonium tsminst3]$ pwd
/home/tsminst3/tsminst3
[tsminst3@plutonium tsminst3]$ ls -al
total 104
drwxr-xr-x 2 tsminst3 tsmsrvr3 4096 Jan 13 06:07 .
drwxr-xr-x 8 tsminst3 tsmsrvr3 4096 Jan 13 05:54 ..
-rw-r--r-- 1 tsminst3 tsmsrvr3 3573 Jan 13 05:54 devconf.dat
-rw-r--r-- 1 tsminst3 tsmsrvr3 69862 Jan 13 06:04 dsmserv.opt
-rw-r--r-- 1 tsminst3 tsmsrvr3 29 Jan 13 05:08 tsmdbmgr.opt
-rw-r--r-- 1 tsminst3 tsmsrvr3 2998 Jan 13 05:38 volhist.dat
-bash-3.2$ /opt/tivoli/tsm/server/bin/dsmserv format dbdir=/home/tsminst3/tsmdb activelogdir=/home/tsminst3/tsmlog archlogdir=/home/tsminst3/tsmarchlog
ANR7800I DSMSERV generated at 01:21:35 on Nov 1 2010.

Tivoli Storage Manager for Linux/x86_64
Version 6, Release 1, Level 4.3

Licensed Materials - Property of IBM

(C) Copyright IBM Corporation 1990, 2009.
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 19207.
ANR0900I Processing options file /home/tsminst3/tsminst3/dsmserv.opt.
ANR7814I Using instance directory /home/tsminst3/tsminst3.
ANR4726I The ICC support module has been loaded.
ANR0152I Database manager successfully started.
ANR1380I The buffer pool monitor switch is enabled.
ANR0992I Server's database formatting complete.
ANR0369I Stopping the database manager because of a server shutdown.
ANR2976I Offline DB backup for database TSMDB1 started.
ANR2974I Offline DB backup for database TSMDB1 completed successfully.

[tsminst3@plutonium tsminst3]$ ls -al
total 108
drwxr-xr-x 3 tsminst3 tsmsrvr3 4096 Jan 13 06:11 .
drwxr-xr-x 8 tsminst3 tsmsrvr3 4096 Jan 13 05:54 ..
-rw-r--r-- 1 tsminst3 tsmsrvr3 3573 Jan 13 05:54 devconf.dat
-rw-r--r-- 1 tsminst3 tsmsrvr3 27 Jan 13 06:09 dsmserv.dbid
-rw-r--r-- 1 tsminst3 tsmsrvr3 69954 Jan 13 06:09 dsmserv.opt
-rw-r--r-- 1 tsminst3 tsmsrvr3 167 Jan 13 06:09 logattr.chk
-rw-r--r-- 1 tsminst3 tsmsrvr3 29 Jan 13 05:08 tsmdbmgr.opt
drwxrwxr-x 3 tsminst3 tsmsrvr3 4096 Jan 13 06:07 tsminst3
-rw-r--r-- 1 tsminst3 tsmsrvr3 2998 Jan 13 05:38 volhist.dat

[tsminst3@plutonium tsminst3]$ /opt/tivoli/tsm/server/bin/dsmserv
ANR7800I DSMSERV generated at 01:21:35 on Nov 1 2010.

Tivoli Storage Manager for Linux/x86_64
Version 6, Release 1, Level 4.3

Licensed Materials - Property of IBM

(C) Copyright IBM Corporation 1990, 2009.
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 19648.
ANR0900I Processing options file /home/tsminst3/tsminst3/dsmserv.opt.
ANR7814I Using instance directory /home/tsminst3/tsminst3.
ANR4726I The ICC support module has been loaded.
ANR0990I Server restart-recovery in progress.
ANR1380I The buffer pool monitor switch is enabled.
ANR1636W The server machine GUID changed: old value (), new value (fe.26.89.20-
.e5.74.df.11.a8.4e.00.14.5e.cc.bb.70).
ANR2100I Activity log process has started.
ANR4726I The NAS-NDMP support module has been loaded.
ANR1794W TSM SAN discovery is disabled by options.
ANR2200I Storage pool BACKUPPOOL defined (device class DISK).
ANR2200I Storage pool ARCHIVEPOOL defined (device class DISK).
ANR2200I Storage pool SPACEMGPOOL defined (device class DISK).
ANR0984I Process 1 for EXPIRE INVENTORY (Automatic) started in the BACKGROUND
at 06:14:41 AM.
ANR0811I Inventory client file expiration started as process 1.
ANR0167I Inventory file expiration process 1 processed for 0 minutes.
ANR0812I Inventory file expiration process 1 completed: processed 0 nodes,
examined 0 objects, deleting 0 backup objects, 0 archive objects, 0 DB backup
volumes, and 0 recovery plan files. 0 objects were retried and 0 errors were
encountered.
ANR0985I Process 1 for EXPIRE INVENTORY (Automatic) running in the BACKGROUND
completed with completion state SUCCESS at 06:14:41 AM.
ANR2803I License manager started.
ANR8200I TCP/IP Version 4 driver ready for connection with clients on port
1503.
ANR2560I Schedule manager started.
ANR0984I Process 2 for AUDIT LICENSE started in the BACKGROUND at 06:14:46 AM.
ANR2820I Automatic license audit started as process 2.
ANR0993I Server initialization complete.
ANR0916I TIVOLI STORAGE MANAGER distributed by Tivoli is now ready for use.
TSM:SERVER1>
ANR2841W Server is NOT IN COMPLIANCE with license terms.
ANR2825I License audit process 2 completed successfully - 0 nodes audited.
ANR0985I Process 2 for AUDIT LICENSE running in the BACKGROUND completed with
completion state SUCCESS at 06:14:56 AM.


Configure the password for DB backup/restore:
[root@plutonium tsminst3]# pwd
/home/tsminst3/tsminst3
[root@plutonium tsminst3]# set | grep DSM
DSMI_CONFIG=/home/tsminst3/tsminst3/tsmdbmgr.opt
DSMI_DIR=/opt/tivoli/tsm/client/api/bin64
DSMI_LOG=/home/tsminst3/tsminst3
[root@plutonium tsminst3]# /home/tsminst3/sqllib/adsm/dsmapipw

*************************************************************
* Tivoli Storage Manager *
* API Version = 6.1.3 *
*************************************************************
Enter your current password:
Enter your new password:
Enter your new password again:

Your new password has been accepted and updated.
[root@plutonium tsminst3]# rm tsmdbmgr.log
rm: remove regular empty file `tsmdbmgr.log'? y

Make sure the DB backup/restore woks finre
ANR0406I Session 1 started for node $$_TSMDBMGR_$$ (Linux x86-64) (Tcp/Ip
localhost(34164)).
ANR0403I Session 1 ended for node $$_TSMDBMGR_$$ (Linux x86-64).
ANR0406I Session 2 started for node $$_TSMDBMGR_$$ (Linux x86-64) (Tcp/Ip
localhost(34165)).
ANR0403I Session 2 ended for node $$_TSMDBMGR_$$ (Linux x86-64).
ANR0406I Session 3 started for node $$_TSMDBMGR_$$ (Linux x86-64) (Tcp/Ip
localhost(34166)).
ANR0403I Session 3 ended for node $$_TSMDBMGR_$$ (Linux x86-64).
ANR2841W Server is NOT IN COMPLIANCE with license terms.
halt
ANR2017I Administrator SERVER_CONSOLE issued command: HALT
ANR1912I Stopping the activity log because of a server shutdown.
ANR0369I Stopping the database manager because of a server shutdown.
ANR0991I Server shutdown complete.

Now update devconfig and volume history with the information from your original instance's backup
>>>>>>>>>>>>>>
update devconfig.dat and volhist.dat
<<<<<<<<<<<<<<

Try to restore the database:
[tsminst3@plutonium tsminst3]$ /opt/tivoli/tsm/server/bin/dsmserv restore db on=onfile activelogd=/home/tsminst3/tsmlog recov=/home/tsminst3/tsmrecov TOD=12/09/2010
ANR7800I DSMSERV generated at 14:02:14 on Nov 2 2010.

Tivoli Storage Manager for Linux/x86_64
Version 6, Release 2, Level 2.0

Licensed Materials - Property of IBM

(C) Copyright IBM Corporation 1990, 2010.
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 19099.
ANR0900I Processing options file /home/tsminst3/tsminst3/dsmserv.opt.
ANR7814I Using instance directory /home/tsminst3/tsminst3.
ANR4726I The ICC support module has been loaded.
ANR1636W The server machine GUID changed: old value (), new value (fe.26.89.20.e5.74.df.11.a8.4e.00.14.5e.cc.bb.70).
ANR8200I TCP/IP Version 4 driver ready for connection with clients on port 1503.
ANR4634I Starting point-in-time database restore to date 12/09/2010 11:59:59 PM.
ANR4620I Database backup series 2 operation 0 device class FILE.
ANR8340I FILE volume /a/dev-file/91883696.DBV mounted.
ANR1363I Input volume /a/dev-file/91883696.DBV opened (sequence number 1).
ANR1364I Input volume /a/dev-file/91883696.DBV closed.
ANR8340I FILE volume /a/dev-file/91883705.DBV mounted.
ANR1363I Input volume /a/dev-file/91883705.DBV opened (sequence number 1).
ANR1364I Input volume /a/dev-file/91883705.DBV closed.
ANR4638I Restore of backup series 2 operation 0 in progress.
ANR0406I Session 1 started for node $$_TSMDBMGR_$$ (DB2/LINUXX8664) (Tcp/Ip localhost(43595)).
ANR8340I FILE volume /a/dev-file/91883696.DBV mounted.
ANR0510I Session 1 opened input volume /a/dev-file/91883696.DBV.
ANR1363I Input volume /a/dev-file/91883696.DBV opened (sequence number 1).
ANR4912I Database full restore in progress and DB Data bytes transferred 67,371,008.
ANR4912I Database full restore in progress and DB Data bytes transferred 134,742,016.
ANR4912I Database full restore in progress and DB Data bytes transferred 202,113,024.
ANR4912I Database full restore in progress and DB Data bytes transferred 269,484,032.
ANR4912I Database full restore in progress and DB Data bytes transferred 336,855,040.
ANR4912I Database full restore in progress and DB Data bytes transferred 404,226,048.
ANR4912I Database full restore in progress and DB Data bytes transferred 471,597,056.
ANR1365I Volume /a/dev-file/91883696.DBV closed (end reached).
ANR4912I Database full restore in progress and DB Data bytes transferred 503,443,467.
ANR1364I Input volume /a/dev-file/91883696.DBV closed.
ANR0514I Session 1 closed volume /a/dev-file/91883696.DBV.
ANR0403I Session 1 ended for node $$_TSMDBMGR_$$ (DB2/LINUXX8664).
ANR0406I Session 2 started for node $$_TSMDBMGR_$$ (DB2/LINUXX8664) (Tcp/Ip localhost(43596)).
ANR8340I FILE volume /a/dev-file/91883705.DBV mounted.
ANR0510I Session 2 opened input volume /a/dev-file/91883705.DBV.
ANR1363I Input volume /a/dev-file/91883705.DBV opened (sequence number 1).
ANR1365I Volume /a/dev-file/91883705.DBV closed (end reached).
ANR4912I Database full restore in progress and DB transaction log bytes transferred 16,801,803.
ANR1364I Input volume /a/dev-file/91883705.DBV closed.
ANR0514I Session 2 closed volume /a/dev-file/91883705.DBV.
ANR0403I Session 2 ended for node $$_TSMDBMGR_$$ (DB2/LINUXX8664).
ANR0406I Session 3 started for node $$_TSMDBMGR_$$ (DB2/LINUXX8664) (Tcp/Ip localhost(43597)).
ANR0403I Session 3 ended for node $$_TSMDBMGR_$$ (DB2/LINUXX8664).
ANR4645I The restore date reflects the most recent backup available up to the specified TODATE.
ANR4635I Point-in-time database restore complete, restore date 12/09/2010 09:34:55 AM.
Error 2121 collecting the server database creation timestamp. The server stops.
ANR2988W Attempt to add the last backup db volume used entry back in to the volume history was unsuccessful.

Error 2121 translates to DBRC_INSUFF_AUTHORITY, a subsequent server start fails:
[tsminst3@plutonium tsminst3]$ /opt/tivoli/tsm/server/bin/dsmserv
ANR7800I DSMSERV generated at 14:02:14 on Nov 2 2010.

Tivoli Storage Manager for Linux/x86_64
Version 6, Release 2, Level 2.0

Licensed Materials - Property of IBM

(C) Copyright IBM Corporation 1990, 2010.
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 19716.
ANR0900I Processing options file /home/tsminst3/tsminst3/dsmserv.opt.
ANR7814I Using instance directory /home/tsminst3/tsminst3.
ANR4726I The ICC support module has been loaded.
ANR0990I Server restart-recovery in progress.
ANR0226S The database ID file could not be found for server startup..

Answer

To circumvent this symptom, if the underlying DB2 is at DB2 9.7 FP2 and newer you can set the following environment variable as the new instance user before you submit the restore command:
db2set DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON

This will allow the restore to complete and the new user have the appropriate access rights for the database:
[tsminst3@plutonium ~]$ db2 "select grantee,securityadmauth from syscat.dbauth"

GRANTEE SECURITYADMAUTH
-------------------------------------------------------------------------------------------------------------------------------- ---------------
TSM Y
TSMINST3 Y

Note: DB2 will not update the access rights if the database exists previous to the database restore. In this case, before you submit the restore do a
db2 drop db TSMDB1

Also note that after the restore the original instance owner still has all access rights as at the time when the backup was taken.

If you are at a level pre DB2 9.7 FP2, you need to set the access rights following technote #1427232 (link provided in related URL) before you take a backup of your database. See the TSM Schedule for Fix Packs (link provided in related URL) for information about the DB2 level with your IBM Spectrum Protect server level.

APAR IC74560 has been opened to address the issue (link provided in related URL).

[{"Product":{"code":"SSGSG7","label":"Tivoli Storage Manager"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Server","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Supported Versions","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Document Information

Modified date:
17 June 2018

UID

swg21462101