Apr 09

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

DB2, Uppgradering 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

Jun 11

ANR0100E Error 105 creating table “OccupancyT”

DB2, Server Command, TSM Server 6, Uppgradering Comments Off on ANR0100E Error 105 creating table “OccupancyT”

Problem(Abstract)

The following message will be seen when trying to start the Tivoli Storage Manager server: ANR0100E adminit.c(2564): Error 105 creating table “OccupancyT”.

Symptom

Unable to start the Tivoli Storage Manager server.

Diagnosing the problem

Attempt to start the Tivoli Storage Manager server in the foreground (dsmserv -k instancename) will show the error. Also the following commands can be run from a DB2 command line to verify what accounts have the needed authority.

set db2instance=server1 db2 connect to TSMDB1 db2 “select grantee,securityadmauth from syscat.dbauth”
This should show that only the system accounts has the authority to create the table

Resolving the problem

There have been a few solutions reported for this error. These solutions will assume a database restore or server migration (moving of the Tivoli Storage Manager server) were not recently done.

1. Rebooting the system may resolve this issue. After a reboot, attempt to start the server again.

2. This error was maybe caused by using the wrong user. Use the same user that did the installation or use instance user.

3. The following can also be done to grant authority to the needed account.
For Windows 2008 – Download psexec
http://technet.microsoft.com/en-us/sysinternals/bb897553
– Once extracted, you can run the following command from a Windows command prompt in the directory where you extracted it. psexec -i -s cmd.exe

For Windows 2003 – From a Windows command prompt enter:
sc create testsvc binpath= “cmd /K start” type= own type= interact sc start testsvc
You should then have a new command prompts at c:\Windows\system32 running whoami at this command prompt should show: nt authority\system
You can then start the db2 command line prompt under this window: “C:\Program Files\Tivoli\TSM\db2\BIN\DB2CW.BAT”
Then to grant grant the needed authority, run the following commands
set db2instance=<instance> db2 connect to TSMDB1 db2 grant dbadm with dataaccess with accessctrl on database to user XXX db2 grant secadm on database to user XXX

written by Bosse

Nov 24

Changing hostname of the DB2 server

TSM Server 6, Uppgradering Comments Off on Changing hostname of the DB2 server
Question
Changing hostname of the DB2 server. What updates in DB2 need to be made?
 
 
Cause
Changing the DB2 server’s hostname.
 
 
Answer
Perform the following on the DB2 server:1) Login as the dasadm user on UNIX/Linux or Local Administrator on Windows. Stop the DB2 Administration Server (DAS):

    db2admin stop

2) Login as the instance owner on UNIX/Linux or Local Administrator on Windows. Stop the DB2 instance:

    db2stop

3) Change the server’s hostname. On a Windows system, a reboot is required before this change will take effect. Do not reboot the Windows Server at this time – you must make the DB2 Configuration changes first.

4) Login as user ROOT on UNIX/Linux and Local Administrator on Windows. Update the DB2SYSTEM registry varibale:

    db2set -g DB2SYSTEM=<new hostname>

5) Locate db2nodes.cfg in one of the following directories:

  • UNIX/Linux:
    <db2 instance home directory>/sqllib/db2nodes.cfg
  • All Windows flavors running DB2 v8 and v9.1:
    Program Files\IBM\SQLLIB\DB2\db2nodes.cfg
  • Windows XP and 2003 running DB2 v9.5:
    Documents and Settings\All Users\Application Data\IBM\DB2\<DB2COPY>\DB2\db2nodes.cfgNOTE: Application Data is a hidden folder
  • Windows Vista and later operating systems: ProgramData\IBM\DB2\<DB2COPY>\DB2\db2nodes.cfg

Note that only DB2 ESE has a db2nodes.cfg. If you are running other editions (WorkGroup Server, or Personal Edition) then you can skip this step and the next.

6) In the db2nodes.cfg file change <current hostname> to <new hostname>.

7) Run the following command to list the current hostname/system name that is cataloged:

    db2 list admin node directory show detail If there are no Admin Node Directory entries then you can skip the next 2 steps. It simply means that you haven’t started the Control Center. The Admin Node Directory will get updated the next time the Control Center is started, based upon the current hostname.

8) Uncatalog the current hostname using this command:

    db2 uncatalog node <nodename>

9) Catalog the admin node with the new hostname using this command:

  •  
  • db2 catalog admin tcpip node <nodename> remote <new hostname> system <new hostname>

    <nodename> can be anything you want it to be (8 characters or less). It does not relate directly to the hostname itself.

10) Update the admin configuration file using these commands:

    db2 update admin cfg using DB2SYSTEM <new hostname>
    db2 update admin cfg using SMTP_SERVER <new hostname>

11) At this time, you should restart your server if running Windows. Note that if your instances are set to auto-start, you may get error messages. These will occur if you have DB2_EXTSECURITY enabled. To correct this, you will need to update the DB2_ADMINGROUP and DB2_USERSGROUP registry entries using the db2extsec command. See the ‘note’ at the end of this technote for more details.

12) Login as the dasadm user on UNIX/Linux or Local Administrator on Windows. Start the DB2 Administration Server (DAS):

    db2admin start

13) Login as the instance owner on UNIX/Linux or Local Administrator on Windows. Start the DB2 instance:

    db2start

14) In Control Center find the old hostname under the “All Systems” folder and right click, choose Remove.

15) In Control Center add the new hostname. Right click on the “All Systems” folder and choose “Add”. Click on “Discover” to locate the new hostname.

NOTE:
Starting in v9.1 FP2, DB2 supports the use of domain groups for extended security. Therefore, when you change the computer name and the computer groups DB2ADMNS and DB2USERS are local computer groups, you must update the DB2_ADMINGROUP and DB2_USERSGROUP global registries. Please see the Related URL for instructions on how to do this.

written by Bosse

May 17
Abstract
Tivoli Storage Manager V6.2 servers that were configured using the configuration wizard or upgrade wizard on Windows systems might have database backups that fail.When the database backup command is issued it might fail and display this message: “ANR2968E Database backup terminated. DB2 sqlcode: -2033. DB2 sqlerrmc: 406.”
 
 
Content
If the upgrade wizard or configuration wizard is used to configure or set up a Tivoli Storage Manager V6.2 server on a Windows system, when the BACKUP DB command is issued, it might fail due to a problem with the setup of the DSMI_api environment variable.
The database backup does not occur, and the server issues this message: “ANR2968E Database backup terminated. DB2 sqlcode: -2033. DB2 sqlerrmc: 406”.
To resolve this problem you must set the DSMI_api environment variable configuration for the database instance.Note: These examples use server1 for the database instance and d:\tsmserver1 for the Tivoli Storage Manager server instance directory. Replace these values with your actual values when issuing the commands.Perform these steps to set the DSMI_ api environment-variable configuration for the database instance:

1. Navigate to the C:\Program Files\Tivoli\TSM\db2\bin directory, or if you installed Tivoli Storage Manager in a different location, go to the db2\bin subdirectory in your main installation directory and issue this command to open a DB2 command window:

db2cmd
2. Issue this command:
db2set -i server1 DB2_VENDOR_INI=d:\tsmserver1\tsmdbmgr.env

Additional information can be found in the Tivoli Storage Manager, Version 6.2 Information Center at: http://publib.boulder.ibm.com/infocenter/tsminfo/v6r2/index.jsp?topic=/com.ibm.itsm.srv.install.doc/t_srv_prep_dbmgr.html.

written by Bosse

May 14
Question
Upgrading the Tivoli Storage Manager server from 5.4.x or 5.5.x to version 6.X can fail during dsmserv insertdb. The error seen is:
ANR2020E INSERTDB: Invalid parameter – \MANIFEST
 
 
Cause
Incorrect use of dsmserv insertdb syntax can cause this error
 
 
Answer
The 6.X info center has the following example syntax for the Dsmserv Insertdb command:

“c:\Program Files\Tivoli\TSM\server\dsmserv” insertdb \
manifest=.\manifest.txt 1>>insert.out 2>&1The “\” character after insertdb tells Windows to go to the next line. But if you enter the following ( all on the same line):”c:\Program Files\Tivoli\TSM\server\dsmserv” insertdb \manifest=.\manifest.txt 1>>insert.out 2>&1

The dsmserv insertdb will fail with the error :

ANR2020E INSERTDB: Invalid parameter – \MANIFEST

If you use this syntax , all on the same line, do not include the “\” after insertdb. For example:

    … dsmserv insertdb manifest=.\manifest.txt 1>>insert.out 2>&1

written by Bosse

May 12

SQL6028N error with catalog command

Uppgradering Comments Off on SQL6028N error with catalog command
Problem(Abstract)
Running the db2 catalog command in order to catalog the Tivoli Storage Manager server database fails with error SQL6028N.
 
 
Cause
Incorrect database directory path was used with the db2 catalog command.
 
 
Environment
Tivoli Storage Manager Server V6.1 and V6.2 on Unix and Linux.
 
 
Diagnosing the problem
The catalog command fails to catalog the Tivoli Storage Manager database (TSMDB1). For example :

$db2 catalog tsmdb1 on /home/tsminst1
SQL6028N Catalog database failed because database “TSMDB1” was not found in
the local database directory.
 
 
Resolving the problem
Follow the below steps to correct the issue.

  1. Find the correct instance directory. For example:
    $cat /etc/tivoli/tsm/instance.info
    ...
    <Database>
    <DatabaseName>TSMDB1</DatabaseName>
    <DatabasePath>/home/tsminst1/tsminst1 </DatabasePath>
    </Database>
    ...

    In above example, the database path is “/home/tsminst1/tsminst1 “
  2. Re-run the failed command using the correct Database path. For example :
    $db2 catalog tsmdb1 on /home/tsminst1/tsminst

written by Bosse

May 12
Abstract
If a connection cannot be established using SSH, RSH, REXEC, or SMB, manually upgrade the IBM® Tivoli® Storage Manager server instance from Version 6.1 to 6.2.
 
 
 
Content
To use a wizard, the upgrade from IBM® Tivoli® Storage Manager Version 6.1 to Version 6.2 requires one of the following protocols on the default port, and that port cannot be blocked by a firewall:
-Secure shell (SSH)
-Remote shell (RSH)
-Remote Execution Protocol (REXEC)-Windows® server message block (SMB)If a connection cannot be established using SSH, RSH, REXEC, or SMB, manually upgrade the Tivoli Storage Manager server instance from Version 6.1 to 6.2.AIX®, Linux®, and UNIX®:
Close the installation wizard if you receive an error message indicating that the
wizard could not connect to your system using SSH, RSH, or REXEC:
All attempts to establish a connection as the instance user ID have failed. This might be due to an inability to connect to the local machine through the SSH, RSH, REXEC, or Windows SMB protocols.Then, use the following procedure to manually upgrade the server instance from Version 6.1.

First, rename the instance file. You can find this file in the following location:
/etc/tivoli/tsm/instance.info

The instance file looks similar to this example and contains DB2 environment
variables as configured for your server instance . Use the
values in this file for the commands necessary to manually upgrade the server
instance.

<Instance>
<InstanceName>tsminst1</InstanceName>
<InstanceUser>tsminst1</InstanceUser>
<DefaultDatabasePath>/home/tsminst1/tsminst1</DefaultDatabasePath>
<Database>
<DatabaseName>TSMDB1</DatabaseName>
<DatabasePath>/home/tsminst1/tsminst1</DatabasePath>
</Database>
<Variables>
<Variable>DB2_SKIPINSERTED=ON></Variable>
<Variable>DB2_KEEPTABLELOCK=ON</Variable>
<Variable>DB2_EVALUNCOMMITTED=ON</Variable>
<Variable>DB2_SKIPDELETED=ON</Variable>
<Variable>DB2CODEPAGE=819</Variable>
<Variable>DB2_PARALLEL_IO=*</Variable>
</Variables>
</Instance>

After renaming the instance file, complete the following steps.
Important: Complete steps 1-6 for each one of your Tivoli Storage Manager server instances.

1. Issue the following command:
/opt/tivoli/tsm/db2/instance/db2idrop InstanceName

2. Start the installation wizard again and step through it to upgrade the Tivoli
Storage Manager server.

3. After the upgrade, recreate each of the instances using the following command:
/opt/tivoli/tsm/db2/instance/db2icrt –u InstanceUser InstanceName

4. Recreate the variables in the instance file using the db2set -i command. Issue
this command for each variable in your instance file. Ensure that the variable is
in quotation marks:
/opt/tivoli/tsm/db2/instance/db2iset –i InstanceName “Variable”

For example, to recreate the first variable in the example instance file, issue the
following command:
db2set -i tsminst1 “DB2_SKIPINSERTED=ON”

5. Stop and start the database instance.
Connect as the user ID that owns the server instance, then issue the following
commands:

a. Start DB2®:
db2start

b. Catalog and upgrade each database:
“db2 catalog db DatabaseName on DatabasePath
“db2 upgrade db DatabaseName

c. Stop DB2:
db2stop

6. Start and run the Tivoli Storage Manager server.

Windows®:

Close the installation wizard if you receive an error message indicating that the
wizard could not connect to your system using SSH, RSH, REXEC, or SMB:
All attempts to establish a connection as the instance user ID have failed. This might be due to an inability to connect to the local machine through the SSH, RSH, REXEC, or Windows SMB protocols.

Then, complete the following procedures to manually upgrade the server instance from Version
6.1.

Before starting the upgrade, rename the instance file. The instance
file (Instance.dat) is in the Tivoli Storage Manager server installation directory

The instance file looks similar to this example and contains DB2 environment
variables as configured for your server instance. Use the
values in the instance file for the commands necessary to manually upgrade the server
instance.

<Instance>
<InstanceName>server1</InstanceName>
<InstanceUser>server1</InstanceUser>
<DefaultDatabasePath>d:\tsm\server1</DefaultDatabasePath>
<Database>
<DatabaseName>TSMDB1</DatabaseName>
<DatabasePath>d:\tsm\server1</DatabasePath>
</Database>
<Variables>
<Variable>DB2_SKIPINSERTED=ON></Variable>
<Variable>DB2_KEEPTABLELOCK=ON</Variable>
<Variable>DB2_EVALUNCOMMITTED=ON</Variable>
<Variable>DB2_SKIPDELETED=ON</Variable>
<Variable>DB2CODEPAGE=819</Variable>
<Variable>DB2_PARALLEL_IO=*</Variable>
</Variables>
</Instance>

After renaming the instance file, complete the following steps.
Important: Complete steps 1-6 for each one of your Tivoli Storage Manager server instances.

1. Issue the following command:
installation_directory\db2\instance\db2idrop InstanceName

2. Start the installation wizard again and step through it to upgrade the Tivoli
Storage Manager server.

3. After the upgrade, recreate each of the instances using the following command:
installation_directorydb2\instance\db2icrt InstanceName –u
InstanceUser, password

4. Recreate the variables in the instance file using the db2set -i command. Issue
this command for each variable in your instance file. Ensure that the variable is
in quotation marks:
installation_directory\db2\instance\db2iset –i InstanceName “Variable”

For example, to recreate the first variable in the example instance file, issue the
following command:
db2set -i server1 “DB2_SKIPINSERTED=ON”

5. Stop and start the database instance:

a. Open a DB2 command window. One method of doing this is by going to
the C:\Program Files\Tivoli\TSM\db2\bin directory, or if you installed
Tivoli Storage Manager in a different location, go to the db2\bin
subdirectory in your main installation directory. Then, issue this command:
db2cmd

b. Set the database instance:
set db2instance=InstanceName

c. Start DB2:
db2start

d. Catalog and upgrade each database name:
“db2 catalog db DatabaseName on DatabasePath
“db2 upgrade db DatabaseName

e. Stop DB2:
db2stop

6. Start and run the Tivoli Storage Manager server.

written by Bosse