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.
Note: For C shell (csh) environments, use the setenv command instead of the
export command to set environment variables. For more information about other
command shells, see the topic "Setting environment variables outside the profile registries on Linux
and UNIX operating systems" in the Db2® documentation.
Note: Do
not run any instance commands in this instance-less client environment.
Procedure
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:
- Strip all setuid bits from the client installation by using the
chmod
command:
Enable 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
-R
and -L
options
with the cp
command 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
chown
command. chown -R owner:group <upgraded_network_dir>/sqllib
Where
owner is
the userid and
group is the group that is known
to all client hosts that share this
sqllib directory.
-
For each user account that uses the upgraded network-mounted
client:
-
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:
export DB2_NET_CLIENT_PATH=<upgraded_network_dir>/sqllib
-
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:
. $DB2_NET_CLIENT_PATH/db2profile
Or on C shell, enter:
source $DB2_NET_CLIENT_PATH/db2cshrc
- 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
commands:
mkdir $HOME/db2
export DB2_APPL_DATA_PATH=$HOME/db2
- 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
following command:
- 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:
export DB2_APPL_CFG_PATH=$HOME/db2
- (Optional) To apply all the environment variable settings
detailed above automatically, define them in the .profile file.