Creating the server instance
Create an IBM Storage Protect instance by issuing the db2icrt command.
About this task

Important: Before you run the db2icrt command, verify the following
items: - The home directory for the user (/home/tsminst1) exists. If there is no
home directory, you must create it. The instance directory stores the following files that are generated by the IBM Storage Protect server:
- The server options file, dsmserv.opt
- The server key database file,
cert.kdb, and the.armfiles (used by clients and other servers to import the Secure Sockets Layer certificates of the server) - Device configuration file, if the DEVCONFIG server option does not specify a fully qualified name
- Volume history file, if the VOLUMEHISTORY server option does not specify a fully qualified name
- Volumes for DEVTYPE=FILE storage pools, if the directory for the device class is not fully specified, or not fully qualified
- User exits
- Trace output (if not fully qualified)
- A
backup copy of the following files must be saved to a safe and secure location:
- Master encryption key files (
dsmkeydb.*) - Server certificate and private key files (
cert.*)
- Master encryption key files (
- The root user and instance-user ID must have write permission to the shell configuration file. A shell configuration file (for example, .profile) exists in the home directory. For more information, see the Db2® product information. Search for Linux® and UNIX environment variable settings.

- Log in using the root user ID and create an IBM
Storage Protect instance. The name of the instance must be the same
name as the user that owns the instance. Use the db2icrt command and enter the
command on one line:


For example, if your user ID for this instance is tsminst1, use the following command to create the instance. Enter the command on one line./opt/tivoli/tsm/db2/instance/db2icrt -a server -u instance_name instance_name

/opt/tivoli/tsm/db2/instance/db2icrt -a server -u tsminst1 tsminst1Remember: From this point on, use this new user ID when you configure your IBM Storage Protect server. Log out of the root user ID and log in under the new instance-user ID. - Change the default directory for the database to be the same as the instance directory for the
server. If you have multiple servers, log in under the instance ID for each server. Issue this
command:
For example, where instance_directory is the instance user ID:db2 update dbm cfg using dftdbpath instance_directorydb2 update dbm cfg using dftdbpath /tsminst1 - Modify the library path to include libraries that are required for server operations. Tip: In the following examples, here are the directories:
- server_bin_directory is a subdirectory of the server installation directory. For example, /opt/tivoli/tsm/server/bin.
- instance_users_home_directory is the home directory of the instance user. For example, /home/tsminst1.
Issue the following command, on one
line:export LIBPATH=server_bin_directory/dbbkapi: /usr/opt/ibm/gsk8_64/lib64:$LIBPATH- You must update one of the following files to set the library path when IBM
Db2 or the server are started. Update per the shell
that the instance user is configured to use.
Bash or Korn shell:
instance_users_home_directory/sqllib/userprofileC shell:
instance_users_home_directory/sqllib/usercshrc - Update per the shell that the instance user is configured to use.
Bash or Korn shell:
Add the following entry to the instance_users_home_directory/sqllib/userprofile file, on one line:
export LIBPATH=server_bin_directory/ dbbkapi:/usr/opt/ibm/gsk8_64/lib64:$LIBPATH
export LD_LIBRARY_PATH=server_bin_directory/ dbbkapi:/usr/local/ibm/gsk8_64/lib64: /opt/ibm/lib: /opt/ibm/lib64:$LD_LIBRARY_PATHC shell:
Add the following entry to the instance_users_home_directory/sqllib/usercshrc file, on one line:
setenv LIBPATH server_bin_directory/dbbkapi: /usr/opt/ibm/gsk8_64/lib64:$LIBPATH
setenv LD_LIBRARY_PATH server_bin_directory/dbbkapi:/ usr/local/ibm/gsk8_64/lib64:/ opt/ibm/lib:/opt/ibm/lib64:/usr/lib64:$LD_LIBRARY_PATHRemember: The following entries must be in the library path, preceding any other entries in the library path:- server_bin_directory/dbbkapi
- /usr/local/ibm/gsk8_64/lib64
- Create a new server options file.
Important: Before you run the db2icrt command,
verify the following items: - Ensure that the user and the instance directory of the user exists. If there is no instance
directory, you must create it. The instance directory stores the following files for the server instance:
- The server options file, dsmserv.opt
- The server key database file,
cert.kdb, and the.armfiles (used by clients and other servers to import the Secure Sockets Layer certificates of the server) - Device configuration file, if the DEVCONFIG server option does not specify a fully qualified name
- Volume history file, if the VOLUMEHISTORY server option does not specify a fully qualified name
- Volumes for DEVTYPE=FILE storage pools, if the directory for the device class is not fully specified, or not fully qualified
- User exits
- Trace output (if not fully qualified)
- Save a backup copy of the following files to a safe and secure location:
- Master encryption key files (
dsmkeydb.*) - Server certificate and private key files (
cert.*)
- Master encryption key files (
- Log in as an administrator and create an IBM
Storage Protect instance, by using the db2icrt command. Enter the following command on one
line. The user account that you specify becomes the user ID that owns the server (the instance user
ID).
For example, if the user account is tsminst1 and the server instance is Server1, enter the following command:db2icrt -u user_account instance_name
You are prompted for the password for user ID tsminst1. Later, when you create and format the database, you use the instance name that you specified with this command, with the -k option.db2icrt -u tsminst1 server1 - Change the default path for the database to be the drive where the instance directory for the
server is located. Complete the following steps:
- Click .
- Enter quit to exit the command line processor.
A window with a command prompt should now be open, with the environment properly set up to successfully issue the commands in the next steps.
- From the command prompt in that window, issue the following command to set the environment
variable for the server instance that you are working
with:
The instance_name is the same as the instance name that you specified when you issued the db2icrt command. For example, to set the environment variable for the Server1 server instance, issue the following command:set db2instance=instance_nameset db2instance=server1 - Issue the command to set the default
drive:
For example, the instance directory is d:\tsm\server1 and the instance location is drive d:. Enter the command:db2 update dbm cfg using dftdbpath instance_locationdb2 update dbm cfg using dftdbpath d:
- Create a new server options file.