Upgrading a network mounted client
When you upgrade a network-mounted client, you must apply the upgrade operations on a staging client workstation.
Before you begin
Upgrade the client environment on the staging client workstation that you used when you created the network-mounted client environment. If you use the same staging client workstation, the client configurations that you specified when you created the environment are transferred to the upgraded environment. However, if the client workstation that you used to create the network-mounted environment is not available, you can copy the sqllib directory on the network path to the $HOME/sqllib directory of a new staging client workstation.
If you do not want to replace binary files during the client upgrade, you must copy the new sqllib directory to a different shared network path. You can use the upgraded environment by setting the DB2_NET_CLIENT_PATH system environment variable to the path address where the new sqllib directory is located.
The staging client workstation that you use to create your client configurations must have the same operating system as the clients that are part of the network-mounted client environment.
To upgrade a network mounted client environment:
- On the staging client workstation:
- Log in with a user ID that does not have root authority, but does have write access to the network directory.
- Use one of the following approaches:
- If you are applying a new client fix pack, issue the installFixPack command. For more information about applying fix packs as a non-root user, see Applying fix packs to a non-root installation.
- If you are upgrading to a new Db2 client version, issue the db2setup command. For more information about upgrading a Db2 client as a non-root user, see Upgrading non-root installations.
- Strip all setuid bits from the client installation by using the
chmod -R -s $HOME/sqllibEnable the variables by running the following chatr commands against the files in the $HOME/sqllib/adm, $HOME/sqllib/bin, and $HOME/sqllib/security directories:
chmod u+w $HOME/sqllib/adm/* chatr +s enable $HOME/sqllib/adm/* chmod u-w $HOME/sqllib/adm/* chmod u+w $HOME/sqllib/bin/* chatr +s enable $HOME/sqllib/bin/* chmod u-w $HOME/sqllib/bin/* chmod u+w $HOME/sqllib/security/* chatr +s enable $HOME/sqllib/security/* chmod u-w $HOME/sqllib/security/*
- Configure the client environment, such as CLI parameters in the db2cli.ini file, the LDAP directory, updating the db2dsdriver.cfg file, Db2 registry variables, and database manager configuration parameters.
- Test your client configuration to ensure that it is working as you expect.
- Copy the $HOME/sqllib directory
that you created to a shared network location on the code server.
This location must be accessible to all client workstations in the
network mounted client environment. You must use the
-Loptions with the
cpcommand to copy all files in subdirectories to the network path and materialize all links as real files and directories:
cp -R -L $HOME/sqllib <upgraded_network_dir>/sqllib
- (Optional) Grant a user group ownership of the sqllib network
directory. You can change ownership of the sqllib directory
by using the
Where owner is the userid and group is the group that is known to all client hosts that share this sqllib directory.
chown -R owner:group <upgraded_network_dir>/sqllib
For each user account that uses the upgraded network-mounted
Set the DB2_NET_CLIENT_PATH environment variable to the shared network location where you copied the new sqllib directory by using the following command:
Use the db2profile and db2cshrc files in the path
that is specified by DB2_NET_CLIENT_PATH to configure system environment
variables that are used by the Db2 client. You can
access these files by using the following commands:
Or on C shell, enter:
- Set the DB2_APPL_DATA_PATH environment
variable to a new local directory to store user-specific data and
diagnostic files. For example, to set the application data path to
the local directory $HOME/db2, run the following
- If a user set the DB2_APPL_CFG_PATH to
a local directory, run the db2ccprf command to
copy the upgraded global configuration to a local directory. For example,
if the local directory is $HOME/db2, run the
db2ccprf -t $HOME/db2
- Update DB2_APPL_CFG_PATH with the
address of the local directory you specified in the db2ccprf command.
For example, if the local directory is $HOME/db2,
run the following command:
- (Optional) To apply all the environment variable settings detailed above automatically, define them in the .profile file.
- Set the DB2_NET_CLIENT_PATH environment variable to the shared network location where you copied the new sqllib directory by using the following command: