May 07

Considerations when upgrading to Tivoli Storage Manager v7

Upgrade Comments Off on Considerations when upgrading to Tivoli Storage Manager v7

Question

What are the known issues you need to be aware of before upgrading to version 7.1 of the Tivoli Storage Manager?

Cause

There are two potential DB2 APARs that you may encounter during your upgrade from v6 to v7.
APAR Numbers:

Note that the underlying sub-directory structure of DB2’s active, active mirror, archive, and archive overflow locations have been changed. As a result, at upgrade time, DB2 attempts to copy the log files from the old sub-directory structure into a new sub-directory structure.

If DB2 is unable to successfully move the log files, the following errors may be seen:

Tivoli Storage Manager Installation/Upgrade Results:

      When running the upgrade of the server, the following warning message is encountered:

ANRI1017W WARNING:   The upgrade command for database TSMDB1 failed. To complete the upgrade of this instance, correct the error and reissue the following command as user <Instance User>:

db2 upgrade database TSMDB1.

      Next, trying to start DB2 and run the upgrade command results in the following:

$ db2start
04/14/2014 16:17:58     0   0   SQL1063N  DB2START processing was successful.
SQL1063N  DB2START processing was successful.

$ db2 upgrade database TSMDB1
SQL1762N  Unable to connect to database because there is not enough space to allocate active log files.  SQLSTATE=08004
db2diag.log File Results:2014-04-08-10.04.20.104213-300 I63592A829           LEVEL: Error
PID     : 14811534             TID : 2058           PROC : db2sysc 0
INSTANCE: prd04                NODE : 000           DB   : TSMDB1
APPHDL  : 0-7                  APPID: *LOCAL.tsmprd04.140408150419
AUTHID  : PRD04                HOSTNAME: prd004
EDUID   : 2058                 EDUNAME: db2agent (TSMDB1) 0
FUNCTION: DB2 UDB, data protection services, sqlpgReallocLogs, probe:970
MESSAGE : ZRC=0x85100084=-2062548860=SQLP_NO_SPACE_FOR_LOG
          "Not enough space to create primary logs"
DATA #1 : String, 59 bytes
Log path / Free space (bytes) / Log space required (bytes):
DATA #2 : String, 52 bytes
/prd04/db2actlog/prd04/NODE0000/LOGSTREAM0000/
DATA #3 : unsigned integer, 8 bytes
16079912960
DATA #4 : unsigned integer, 8 bytes
137441050624

2014-04-08-10.04.20.161956-300 I71011A511           LEVEL: Warning
PID     : 10944702             TID : 1              PROC : db2bp
INSTANCE: prd04                NODE : 000
HOSTNAME: prd004
EDUID   : 1
FUNCTION: DB2 UDB, base sys utilities, sqlemgdb, probe:365
MESSAGE : ZRC=0xFFFFF91E=-1762
          SQL1762N  Unable to connect to database because there is not
          enough space to allocate active log files.

 

Answer

For APAR IC99700, there are two possible solutions you can do before attempting your upgrade.

    1. Double the size of the file system where your active log resides. All this space will be needed because the log files are copied from the old location to the new location (refer to APAR IC97073).
    2. Change the size of your active log by updating the ACTIVELOGSIZE in your dsmserv.opt file. Once you update this option, restart your Tivoli Storage Manage server, prior to your upgrade, to allow the new size to take effect. If this is the option you select, ensure you have double the space in your active log file system. After you complete the upgrade, start your server and go through your verification steps. Halt your Tivoli Storage Manager server and reset your ACTIVELOGSIZE option to your desired size and then start your server.

For APAR IC97073, there is no work around. Following a successful v7 upgrade, be aware that there is a chance the old log files will not be removed. These old files may need to be manually removed. Before removal, verification of the configuration from both the Tivoli Storage Manager and DB2 perspectives should be completed. Contact Support for assistance.

Related information

IBM Tivoli Storage Manager Upgrade and Migration Proces

written by Bosse

May 07

Archive and active log directories are full and server will not start

ActiveLog ArchiveLog Comments Off on Archive and active log directories are full and server will not start

Question

If a FULL database backup is not taken in time to prune the archive logs before the directory becomes full. Either the active log becomes full, or the active directory becomes full of the logs that could not be archived. The result is that the Tivoli Storage Manager server shuts down.

Cause

Tivoli Storage Manager server shuts down and archive log directory and active log directory are full. The server cannot be started again.

Answer

When the archive log directory or active log directory fills up, or when the pre-allocated active logs fill up, the Tivoli Storage Manager shuts down. In order to get the Tivoli Storage Manager server up and running, you must update the DB2 configuration to change the location of the active log directory to a new location. This will allow to active logs to free up space and then the Tivoli Storage Manager server can start. You can then clear the archive log directory by issuing database backups. Complete the following procedure:

1. Create a temporary directory large enough to place the active logs.
See dsmserv.opt for value of ACTIVELOGSIZE.

2. Open a DB2 command prompt:
Windows:
Go to Start > All Programs > IBM DB2 > DB2COPY1 > Command Line Tools > Command Window – Administrator.

AIX/Linux/Unix:
1. Open a terminal session.
2. Log in as the Tivoli Storage Manager instance user.

3. Update the DB2 configuration to specify the new location for active log directory that you just created. From the DB2 command prompt, issue the following commands:
set db2instance=SERVER1
db2start
db2 update db cfg for tsmdb1 using newlogpath <path_from_step1>
db2 connect to tsmdb1

4. The active log files will not be removed until the following ‘activate’ command is issued.
First perform a deactivation to ensure that the database is not already activated:
db2 deactivate db tsmdb1
Then run the activate command:
db2 activate db tsmdb1

Note: The active logs will be COPIED and RENAMED (not moved) to the new temporary directory that you specified in step 1.

5. You have 2 options to prune the archive logs to get the Tivoli Storage Manager sever back up and running:

Hide details for Option A: Have Tivoli Storage Manager prune the archive logsOption A: Have Tivoli Storage Manager prune the archive logs
You can have Tivoli Storage Manager prune the archive logs by issuing database backups. You will need to update the DB2 configuration to point the active log direction location back to the original location, and then issue the activate command to copy over the log files to the original location. Since these newly created active log files have space to write transactions, the Tivoli Storage Manager server can start, and you can initiate DB backups to prune the archive logs. Complete the following steps:

A.5.1. Update the DB2 parameter to point the location of the active log back to the original location.
See ACTIVELOGDIRECTORY value in dsmserv.opt.
db2 UPDATE DATABASE CONFIG FOR TSMDB1 USING NEWLOGPATH <path_to_activelogdir>

A.5.2. Issue the activate command to copy the logs to the original location:
db2 activate db tsmdb1

A.5.3. Start the Tivoli Storage Manager server in the foreground.
Open a command terminal and navigate to the server directory and issue the dsmserv command to start the correct instance. Refer to the command here:
http://publib.boulder.ibm.com/infocenter/tsminfo/v6r2/topic/com.ibm.itsm.srv.ref.doc/r_cmd_dsmserv_start.html

A.5.4. Run a database backup to prune some of the archive logs.
dsmserv backup db type=full dev=<your device class>

A.5.5. Review the archive log directory. Is the drive/volume free space still low? You will have to decide if you need to run a second database backup to avoid having the archive logs fill up again before the next scheduled database backup. This depends on the average growth of archive logs per day. Review the timestamps on the archive log.

Hide details for Option B: Have DB2 prune the archive logsOption B: Have DB2 prune the archive logs
You can have DB2 prune the archive logs by running a DB2 database backup.

B.5.1. Create a directory on a drive/volume with enough space to hold a full DB2 database backup.

B.5.2. From the DB2 command prompt, issue the following commands:
db2 deactivate db tsmdb1
db2 backup db tsmdb1 to <path_to_database_directory>

Examples:
Windows: db2 backup db tsmdb1 to C:\dbbackup
AIX/Linux: db2 backup db tsmdb1 to /tmp/dbbackup

The following message will appear once the backup is complete:
Backup successful. The timestamp for this backup image is: 20090721130818
At the end of this backup, archive logs will start pruning.
Note: depending on the size of the database and archive logs, this could take a while to complete the backup.

B.5.3 Review the archive log directory. Is the drive/volume free space still low? You will have to decide if you need to run a second DB2 database backup to avoid having the archive logs fill up again before the next scheduled Tivoli Storage Manager database backup. This depends on the average growth of archive logs per day. Review the timestamps on the archive log.
If need, issue another DB2 database backup.

B.5.4. Delete any DB2 database backups as follows:
db2stop
db2start
db2 connect to tsmdb1
db2 PRUNE HISTORY <timestamp> WITH FORCE OPTION AND DELETE

where <timestamp> is the timestamp that was displayed after the DB2 database backup completed. See step B.5.2, where the timestamp is: 20090721130818.

B.5.5. Update the DB2 parameter to point the location of the active log back to the original location.
Ssee ACTIVELOGDIRECTORY value in dsmserv.opt.
db2 UPDATE DATABASE CONFIG FOR TSMDB1 USING NEWLOGPATH <path_to_activelogdir>

B.5.6. Connect to the database to start automatic moving of active logs from the temporary location to original active log location.
db2 force application all
db2stop
db2start
db2 connect to tsmdb1

The connect command will trigger DB2 to move (not copy) the active logs to the original directory.
Note: depending on the size of the active logs, this process can take a long time.

B.5.7. Start Tivoli Storage Manager server in foreground.
Open a command terminal and navigate to the server directory and issue the dsmserv command to start the correct instance. Refer to the command here:
http://publib.boulder.ibm.com/infocenter/tsminfo/v6r2/topic/com.ibm.itsm.srv.ref.doc/r_cmd_dsmserv_start.html

B.5.8. Take a full database backup by issuing the following commands:
disable sessions
backup db type=full dev=<your device class>
enable sessions

Now that the Tivoli Storage Manager server is up and running, attention should be paid to see how often FULL Tivoli Storage Manager database backups are needed in order to prune the archive log directory.

written by Bosse

May 07

Configuring DB2 log archives to Tivoli Storage Manager

TSM 7.1 Comments Off on Configuring DB2 log archives to Tivoli Storage Manager

Question

Configuration steps required to send DB2 archive log data to the Tivoli Storage Manager Server

Cause

Technotes 1391970 (Configuring DB2 and Tivoli Storage Manager in Windows) and 1635414 (Configuring DB2 and Tivoli Storage Manager in Unix / Linux) describe configuring the DB2 DB backups to Tivoli Storage Manager, but additional steps are required in order to send log archives.

Answer

This document presumes that you have already configured the DB2 backups to Tivoli Storage Manager, so the steps for registering a nodename, configuring dsm.opt/dsm.sys, etc., are not included here. Reference the links to the above technotes for more information on that aspect of the configuration.

To ensure the DB2 archive log data can be successfully stored on the Tivoli Storage Manager Server, perform the following steps:

1) Define an archive copygroup for the default management class within the active policyset of the domain in which the node resides.

    DEFINE COPYGROUP domain_name policyset_name mgmtclass_name TYPE=ARCHIVE DESTINATION=archive_stgpool_name RETVER=NOLIMIT

Note: It is recommended to specify a different storage pool hierarchy for the archive logs than the DB2 database backups, especially if the backups are including the DB2 archive logs (which is the default behavior for a full DB2 backup). If the DB2 archive data is in the same storage pool as the DB2 backup data, you can run into the scenario where a DB2 archive log retrieve (which occurs during a DB2 backup) will preempt access to a volume that a DB2 backup session has mounted. This will cause the backup to fail.

2) If the archive logs will be stored using a different management class other than the default, create the additional Archive copygroup for that management class using the syntax in step 1. It is recommended to define an archive copygroup for the default Mgmt Class even if you plan to use a different management class than the default, since this will be checked during the session initialization.

3) Validate and activate the policyset to enable the changes made in the previous steps.

      VALIDATE POLICYSET domain_name policyset_name

ACTIVATE POLICYSET domain_name policyset_name

On the Tivoli Storage Manager client where DB2 resides:

4) Update the database configuration in DB2 to save the log archive data using the Tivoli Storage Manager API interface. Log in as the instance owner (for Windows, also open a ‘db2cmd’ window) and update the db cfg for the databases in question:

      db2 update db cfg for

db_name

    using logarchmeth1 TSM

If you’re specifying a different management class than the default, include the Mgmt Class specification as follows:

      db2 update db cfg for

db_name

      using logarchmeth1 TSM:

mgmtclass_name
5) Restart DB2 to pick up the changes to the DB CFG.

Related information

Configuring DB2 and Tivoli Storage Manager in Unix / Li
Configuring DB2 and Tivoli Storage Manager in Windows

written by Bosse

May 07

Tivoli Storage Manager server upgrade from V6 to V7 fails with ANRI1043E

TSM 7.1 Comments Off on Tivoli Storage Manager server upgrade from V6 to V7 fails with ANRI1043E

Problem(Abstract)

A Tivoli Storage Manager server is upgraded from V6 to V7. The upgrade fails with the following error :
ANRI1043E: An error occurred while dropping the DB2 instances.

Symptom

The following errors are logged :


=====> IBM Installation Manager> Error

ERROR: Error during “install” phase:

Details:
ANRI1043E: An error occurred while dropping the DB2 instances. To review errors and correct any issues, review the log files in /var/ibm/InstallationManager/logs/native.

 

Cause

Orphaned DB2 instance causing the db2idrop command to fail during upgrade

 

Environment

Tivoli Storage Manager Server on Unix/Linux

Diagnosing the problem

1. Run the db2ilist command to verify the DB2 instances that are configured on the system. For example :

# /opt/tivoli/tsm/db2/instance/db2ilist

tsmi
tsmiold

In this case, it shows two instances, tsmi and tsmiold. The tsmiold instance is an instance that is no longer in use.

2. Run the db2greg command to verify the DB2 registry. For example :

/opt/tivoli/tsm/db2/bin/db2greg -dump show
V,DB2GPRF,DB2SYSTEM,xvotsmsrv01,/opt/tivoli/tsm/db2,
I,DB2,9.7.0.6,tsmi,/home/tsmi/sqllib,,1,0,/opt/tivoli/tsm/db2,,
V,DB2GPRF,DB2INSTDEF,tsmi,/opt/tivoli/tsm/db2,
I,DB2,9.7.0.4,tsmiold,/home/tsmiv/sqllib,,1,0,/opt/tivoli/tsm/db2,,
V,DB2GPRF,DB2FCMCOMM,TCPIP4,/opt/tivoli/tsm/db2,
S,DB2,9.7.0.6,/opt/tivoli/tsm/db2,,,6,0,,1359560348,0

Again, in this case, the registry shows references to the tsmi and tsmiold instances

3. Run the db2idrop command to remove the old instance (tsmiold). The command fails with the following error :

DBI1081E The file or directory /home/tsmiold/sqllib/bin is missing.

 

Resolving the problem

Remove the orphaned DB2 registry reference to the old instance (tsmiold) with the following command :


/opt/tivoli/tsm/db2/bin/db2greg -delinstrec instancename=tsmiold

Retry the upgrade once the orphaned instance is removed

written by Bosse

May 07

Server failed to start after upgrade SQL5035N

TSM 7.1 Comments Off on Server failed to start after upgrade SQL5035N

Problem(Abstract)

After a server upgrade, it fails to start with the follwing error:

SQL5035N The database must be upgraded to the current release.

Symptom

When trying to start the Tivoli Storage Manager server after an upgrade and you receive the following error:

ANR9999D_3831306406 ReportSQLDiagInfo(dbieval.c:1568) Thread (5): Missing sqlState=55001, sqlCode=-5035 from table. Returning rc = 9994. SQL5035N The database must be upgraded to the current release. SQLSTATE=55001

 

Cause

The database instance did not upgrade properly during the upgrade process.

 

Diagnosing the problem

Run the following DB2 commands as the Tivoli Storage Manager instance user (default: tsminst1):

db2start
db2 connect to tsmdb1

You will get:
SQL5035N The database must be upgraded to the current release.
SQLSTATE=55001

 

Resolving the problem

You will need to manually complete the upgrade of the database instance using the commands below:

db2start
db2 upgrade database TSMDB1
Note: The upgrade command will take time, depending on how big the database is. There will be no progress messages given. You can monitor the CPU/Memory usage to verify the process is running.

After the upgrade completes, try the DB2 connect commands again and it should be successful.
db2start
db2 connect to tsmdb1
Now you can start your Tivoli Storage Manager server.

written by Bosse