DB2 10.5 for Linux, UNIX, and Windows

REFRESH LDAP command

Refreshes the cache on a local machine with updated information when the information in Lightweight Directory Access Protocol (LDAP) has been changed.

Authorization

None

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-REFRESH LDAP--+-CLI CFG--+-----------------------+-+--------><
                 |          '-AT--+-USER---+--LEVEL-' |   
                 |                '-GLOBAL-'          |   
                 +-DB DIR-----------------------------+   
                 +-NODE DIR---------------------------+   
                 '-IMMEDIATE--+-----+-----------------'   
                              '-ALL-'                     

Command parameters

CLI CFG
Specifies that the CLI configuration is to be refreshed. This parameter is not supported on AIX® or the Solaris operating system.

On Windows operating system, the REFRESH LDAP CLI CFG command writes the CLI configuration parameters that are stored in LDAP into the user-level db2cli.ini initialization file. When the REFRESH LDAP CLI CFG command is run on a Windows operating system, the user-level db2cli.ini initialization file is re-created and updated with the CLI configuration parameters that are stored in LDAP server. Depending on the version of Windows operating system, the user-level db2cli.ini initialization file is stored in the Documents and Settings\UserName or the \Users\UserName directory, where UserName represents the name of the logged in user.

AT USER LEVEL
The default behavior. The REFRESH LDAP CLI CFG AT USER LEVEL command writes the CLI configuration parameters that are stored in LDAP into the user-level db2cli.ini initialization file.
AT GLOBAL LEVEL
Updates and appends all configuration information in the db2cli.ini initialization file with the global configuration information, which is specified for all the user IDs, on the LDAP server.
DB DIR
Specifies that the database directory is to be refreshed.
NODE DIR
Specifies that the node directory is to be refreshed.
IMMEDIATE
Specifies that the local database and node directories are to be refreshed immediately.
ALL
Specifies that all database and node entries contained within the LDAP server are to be added into the local database and node directories.

Usage notes

If the object in LDAP is removed during refresh, the corresponding LDAP entry on the local machine is also removed. If the information in LDAP is changed, the corresponding LDAP entry is modified accordingly. If the DB2CLI.INI file is manually updated, the REFRESH LDAP CLI CFG command must be run to update the cache for the current user.

The REFRESH LDAP DB DIR and REFRESH LDAP NODE DIR commands remove the LDAP database or node entries found in the local database or node directories. The database or node entries will be added to the local database or node directories again when the user connects to a database or attaches to an instance found in LDAP, and DB2LDAPCACHE is either not set or set to YES.

The REFRESH LDAP IMMEDIATE command updates entries from the local database and node directories using the latest information found in LDAP. This update occurs immediately and regardless if DB2LDAPCACHE is enabled or not. Only database and node entries that originated from LDAP will be updated. Entries that were added manually remain unchanged.

The REFRESH LDAP IMMEDIATE ALL command immediately populates the local database and node directories with all the information found in LDAP. If an entry found in LDAP matches an existing local entry, the command will update the entry. This update will only occur if the local entry originated from LDAP. Entries that were added manually remain unchanged. This update is performed regardless if DB2LDAPCACHE is enabled or not.

When LDAP is disabled, performing either REFRESH LDAP IMMEDIATE or REFRESH LDAP IMMEDIATE ALL will result in SQLCODE -3279 (The command did not complete successfully because LDAP is disabled).