This article provides the steps involved in removing spectrum protect server instance completely on a Windows operating system. This procedure is a helpful step when there is requirement to move TSM server instance directory to a new storage location without uninstalling Spectrum Protect Server. After clean and complete removal of instance, a fresh instance can be created on a new storage directory location before restoring TSM database from latest backup. IBM Spectrum Protect formerly known as TSM (Tivoli Storage Manager) is an enterprise class Data Protection software.
About this task
To remove a server instance without uninstalling the Spectrum Protect server on Windows operating system complete the following steps:
Prerequisite Steps
Make sure prerequisite steps are performed before actual steps are performed
Step 1:
Make sure all client backups sessions have completed. In case any of any running backups please wait for the backups to complete or cancel backup sessions forcefully before proceeding.
Command to query backup session number
query session
Command to cancel backup session
cancel session <session number>
Step 2:
Make sure all server process have completed. In case any of any running process please wait for the process to complete or cancel process forcefully before proceeding.
Command to query server process number
query process
Command to cancel backup session
cancel process <process number>
Step 3:
Collect information about present TSM Database paths and Logs and save outputs for future reference.
Command to capture present database paths and space usage details
query dbspace
Command to capture present activelog and archivelog paths.
query log f=d
Step 4:
Gather information about each Db2 instance. Note the default database path, actual database path, database name, database alias, and any Db2 variables that are configured for the instance. Keep the record for future reference. This information is required to
Log on to the computer where the server is installed. Ensure that you are logged on with the instance user ID.
Obtain a list of Db2 instances. Issue the following system command
db2ilist
Open the Db2 command window by issuing the following system command
db2cmd
To change the instance, issue the following system command where instance specifies the Db2 instance. This command is executed on DB2 Command Line Processor open with db2cmd executed in last step.
set DB2INSTANCE=instance
Run below commands on DB2 Command Line Processor to collect database instance variables and values. Keep the record for future reference.
db2 get dbm cfg | findstr DFTDBPATH
db2 get dbm cfg
db2 list database directory
db2set -all
db2 get db cfg for tsmdb1
Step 5:
Initiate database backup with below command. Modify device class command as per site config.
backup db devclass=ltoclass type=full
Step 6:
After successful database backup save a copy of important files to alternate location outside server.
Back up the device configuration information by issuing the following administrative command
backup devconfig filenames=file_name
Back up the volume history information by issuing the following administrative command
backup volhistory filenames=file_name
Save a copy of the server options file, which is typically named dsmserv.opt. The file is in the server instance directory.
Step 7:
Stop the spectrum protect server by issuing the following administrative command
halt
Verify that the server is shut down and no processes are running. Open the Windows Task Manager application and review the list of active processes.
Actual Steps
Below mentioned steps will completely remove server instance on Windows machine without uninstalling Spectrum Protect Server.
Step 1:
Login as the Instance user and open Windows command prompt. To obtain a list of all the db2 instances. Issue the following system command
db2ilist
Open the Db2 command window by issuing the following system command
db2cmd
To change the instance, issue the following system command where instance specifies the Db2 instance. This command is executed on DB2 Command Line Processor open with db2cmd executed in last step.
set DB2INSTANCE=instance
To start db2 instance issue the following command:
db2start
To list the database names issue the following command:
db2 list database directory
Step 2:
To drop the database tsmdb1 listed in last command issue the following command:
db2 drop db tsmdb1
To stop the instance issue the following command.
db2stop
Step 3:
To remove the instance issue the following system command.
db2idrop <instance name>
Example: If the instance you want to remove is “Server1” you would issue command:
db2idrop Server1
Step 4:
To remove the registry entries related to Spectrum Protect server instance execute below steps.
Open the Windows Registry Editor regedit and navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\IBM\ADSM\CurrentVersion\Server
In this path you will find the server instance directory. Remove the instance directory Server1.
Do not remove HKEY_LOCAL_MACHINE\SOFTWARE\IBM\ADSM\CurrentVersion\Server string itself.
Open the Windows Registry Editor regedit and navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
In this path TSM instance service needs to be removed.
NOTE: Before making any registry changes it is always advised to export the registry to a location outside current server local disk.
Step 4:
Cleanup the filesystem folders related to Spectrum Protect server instance removed.
Delete all files located in the instance directory. Delete the instance directory completely.
Delete the folder with instance name in Drive root path.
Example: C:\<instance name> or D:\Server1
Delete all log and DB files for the instance. The location of these volumes was determined at the time of configuration. There is no default location.
Step 5:
Reboot the server and check the Spectrum protect server instance service has been removed from windows services.
You are now ready to run the Tivoli Storage Manager instance configuration again.