Troubleshooting IBM Spectrum Protect (TSM) Server startup issues and useful TSM DB2 Commands

1) To find out the reason for the issue in the TSM Server, any TSM admin will use this below command to search the activity log. Activity log stores all the information regarding server processes and sessions. Use the following command to find the reason behind the issue.
Query actlog begindate=today-1 begintime=17:00 

2) To find the TSM Server startup issues use the dsmserv command in foreground. It will tell what went wrong to startup the TSM Server
In Windows - C:\program files\tivoli\tsm\server\dsmserv
In Unix (TSM 5.5) - # /usr/tivoli/tsm/server/bin/dsmserv
             (TSM 6, 7) - # /opt/tivoli/tsm/server/bin/dsmserv

3) To find the DB2 startup issues run db2start command in the foregraound. It will show what causing it to not start the db2.
In Windows - C:\program files\tivoli\tsm\db2\db2start

4) The db2error.log file will have all the errors regarding TSM DB2. Checking this file would help to fix the db2 problems.

TSM Server DB2 Commands

Run these commands only if you are aware of the expected o/p. otherwise dont risk of running the commands


CommandDescriptionExample
db2cmdOpens the command line processor DB2 window, and initializes the DB2 command-line environment.Open the DB2 command window:
db2cmd 
db2icrt
Creates DB2 instances in the home directory of the instance owner.
Tip: The Tivoli Storage Manager configuration wizard creates the instance used by the server and database. After a server is installed and configured through the configuration wizard, the db2icrt command is generally not used.
 This utility is in the DB2DIR/instance directory, whereDB2DIR represents the installation location where the current version of the DB2 database system is installed.
 This utility is located in the DB2PATH\bindirectory where DB2PATH is the location where the DB2 copy is installed.
Manually create a Tivoli Storage Managerinstance. Enter the command on one line:
/opt/tivoli/tsm/db2/instance/
db2icrt -a server -s ese -u
instance_name instance_name
db2osconfChecks the settings of the kernel configuration parameters and suggests updates to improve performance. The suggested updates provided by thedb2osconf utility are the minimum settings required to run DB2 on your system.Retrieve a list of currently supported options:
db2osconf
db2setDisplays DB2 variables.List DB2 variables:
db2set
CATALOG DATABASEStores database location information in the system database directory. The database can be located either on the local workstation or on a remote database partition server. The server configuration wizard takes care of any catalog needed for using the server database. Run this command manually, after a server is configured and running, only if something in the environment changes or is damaged.Catalog the database:
db2 catalog database tsmdb1 
CONNECT TO DATABASEConnects to a specified database for command-line interface (CLI) use.Connect to the Tivoli Storage Managerdatabase from a DB2 CLI:
db2 connect to tsmdb1
GET DATABASE CONFIGURATION
Returns the values of individual entries in a specific database configuration file.
Important: This command and parameters are set and managed directly by DB2. They are listed here for informational purposes and a means to view the existing settings. Changing these settings might be advised by IBM support or through service bulletins such as APARs or Technical Guidance documents (technotes). Do not change these settings manually. Change them only at the direction of IBM and only through the use of Tivoli Storage Manager server commands or procedures.
Show the configuration information for a database alias:
db2 get db cfg for tsmdb1 
Retrieve information in order to verify settings such as database configuration, log mode, and maintenance.
db2 get db config for tsmdb1 
show detail 
GET DATABASE MANAGER CONFIGURATION
Returns the values of individual entries in a specific database configuration file.
Important: This command and parameters are set and managed directly by DB2. They are listed here for informational purposes and a means to view the existing settings. Changing these settings might be advised by IBM support or through service bulletins such as APARs or Technical Guidance documents (technotes). Do not change these settings manually. Change them only at the direction of IBM and only through the use of Tivoli Storage Manager server commands or procedures.
Retrieve configuration information for the database manager:
db2 get dbm cfg 
GET HEALTH SNAPSHOTRetrieves the health status information for the database manager and its databases. The information returned represents a snapshot of the health state at the time the command was issued. Tivoli Storage Manager monitors the state of the database using the health snapshot and other mechanisms that are provided by DB2. There might be cases where the health snapshot or other DB2 documentation indicates that an item or database resource might be in an alert state. Such a case indicates that action must be considered to remedy the situation. Tivoli Storage Manager monitors the condition and responds appropriately. Not all declared alerts by the DB2 database are acted on.Receive a report on DB2 health monitor indicators:
db2 get health snapshot for 
database on tsmdb1 
GRANT (Database Authorities)Grants authorities that apply to the entire database rather than privileges that apply to specific objects within the database.Grant access to the user ID itmuser:
db2 GRANT CONNECT ON DATABASE 
TO USER itmuser 
db2 GRANT CREATETAB ON DATABASE 
TO USER itmuser 
RUNSTATSUpdates statistics about the characteristics of a table and associated indexes or statistical views. These characteristics include number of records, number of pages, and average record length.
To see a table, issue this utility after updating or reorganizing the table.
A view must be enabled for optimization before its statistics can be used to optimize a query. A view that is enabled for optimization is known as a statistical view. Use the DB2 ALTER VIEW statement to enable a view for optimization. Issue the RUNSTATS utility when changes to underlying tables substantially affect the rows returned by the view.
Tip: The server configures DB2 to run the RUNSTATScommand as needed.
Update statistics on a single table.
db2 runstats on table 
SCHEMA_NAME.TABLE_NAME 
with distribution and sampled 
detailed indexes all 
 set db2instanceDetermines which instance applies to the current session.Determine which instance is applicable:
set db2instance=tsminst1 
SET SCHEMAChanges the value of the CURRENT SCHEMA special register, in preparation for issuing SQL commands directly through the DB2 CLI.
Tip: A special register is a storage area that is defined for an application process by the database manager. It is used to store information that can be referenced in SQL statements.
Set the schema for Tivoli Storage Manager:
 db2 set schema tsmdb1
START DATABASE MANAGERStarts the current database manager instance background processes. The Tivoli Storage Managerserver starts and stops the instance and database whenever the server starts and halts.
Important: Allow the Tivoli Storage Manager server to manage the starting and stopping of the instance and database unless otherwise directed by IBM support.
Start the database manager:
db2start 
STOP DATABASE MANAGERStops the current database manager instance. Unless explicitly stopped, the database manager continues to be active. This command does not stop the database manager instance if any applications are connected to databases. If there are no database connections, but there are instance attachments, the command forces the instance attachments to stop first. Then, it stops the database manager. This command also deactivates any outstanding database activations before stopping the database manager.
This command is not valid on a client.
The Tivoli Storage Manager server starts and stops the instance and database whenever the server starts and halts.
Important: Allow the Tivoli Storage Manager server to manage the starting and stopping of the instance and database unless otherwise directed by IBM support.
Stop the database manager:
db2 stop dbm 

Video Tutorial on TSM Server startup troubleshooting



0 Comment to "Troubleshooting IBM Spectrum Protect (TSM) Server startup issues and useful TSM DB2 Commands"

Post a Comment