The following is a brief list of DB2 registry values and
environment variables that you may need to know about to get up and running.
Each has a brief description; some may not apply to your environment.
Parameter | Operating System | Values | Description | ||
---|---|---|---|---|---|
General | |||||
DB2ACCOUNT | All | Default=(not set) | The accounting string that is sent to the remote host. Refer to the DB2 Connect User's Guide for details. | ||
DB2CODEPAGE | All | Default: derived from the language ID, as specified by the operating system. | Specifies the code page of the data presented to DB2 for database client application. The user should not set db2codepage unless explicitly stated in DB2 documents, or asked to do so by DB2 service. Setting db2codepage to a value not supported by the operating system can produce unexpected results. Normally, you do not need to set db2codepage because DB2 automatically derives the code page information from the operating system. | ||
DB2COUNTRY | All | Default: derived from the language ID, as specified by the operating system. | Specifies the country code of the client application, which influences date and time formats. | ||
DB2DBDFT | All | Default=(not set) | Specifies the database alias name of the database that will be implicitly connected to when applications are started and no implicit connect has been done. This keyword is ignored if it is set. | ||
DB2DBMSADDR | Windows 95 | Default=(not set),
Value: (90000000) | Sets the memory location from which the Windows 95 system allocates
shared memory for an instance. For each additional instance you must specify a
different memory location from within the range 0x80000000 to 0xBFFFFFFF.
On a Windows 95 system, you need to override the default value (90000000) only if you get an error message indicating you could not create database shared memory. | ||
DB2DISCOVERYTIME | OS/2, Windows 95, and Windows NT | Default=40 seconds,
Minimum=20 seconds | Specifies the amount of time that SEARCH discovery will search for DB2 systems. | ||
DB2INCLUDE | All | Default=current directory | Specifies a path to be used during the processing of the SQL INCLUDE text-file statement during DB2 PREP processing. It provides a list of directories where the INCLUDE file might be found. Refer to the Embedded SQL Programming Guide for descriptions of how db2include is used in the different precompiled languages. | ||
DB2INSTDEF | OS/2, Windows 95 and Windows NT | Default=DB2 | Sets the value to be used if DB2INSTANCE is not defined. | ||
DB2OPTIONS | All except Windows 3.1 and Macintosh | Default=null | Sets command line processor options. | ||
DB2SLOGON | Windows 3.1 | Default=NO | Enables a secure logon in DB2 for Windows 3.1. If db2slogon=YES DB2 does not write user IDs and passwords to a file, but instead uses a segment of memory to maintain them. When db2slogon is enabled, the user must logon each time Windows 3.1 is started. | ||
DB2TIMEOUT | Windows 3.1 and Macintosh | Default=(not set) | Used to control the timeout period for Windows 3.1 and Macintosh clients during long SQL queries. After the timeout period has expired a dialog box pops up asking if the query should be interrupted or allowed to continue. The minimum value for this variable is 30 seconds. If db2timeout is set to a value between 1 and 30, the default minimum value will be used. If db2timeout is set to a value of 0, or a negative value, the timeout feature is disabled. This feature is disabled by default. | ||
DB2TRACENAME | Windows 3.1 and Macintosh | Default= DB2WIN.TRC | On Windows 3.1 and Macintosh, specifies the name of the file where trace information is stored. The default is db2tracename=DB2WIN.TRC, and is saved in your current instance directory (for example, \sqllib\db2). We strongly recommend that you specify the full path name when naming the trace file. | ||
DB2TRACEON | Windows 3.1 and Macintosh | Default=N,
Values: Y, N | On Windows 3.1 and Macintosh, turns trace on to provide information to IBM in case of a problem. (It is not recommended that you turn trace on unless you encounter a problem you cannot resolve.) Refer to the Troubleshooting Guide for information on using the trace facility with DB2 Client Application Enabler. | ||
DB2TRCFLUSH | Windows 3.1 and Macintosh | Default=N,
Values: Y, N | On Windows 3.1 and Macintosh, db2trcflush can be used in conjunction with db2traceon=Y. Setting db2trcflush=Y will cause each trace record to be written immediately into the trace file. This will slow down your DB2 system considerably, so the default setting is db2trcflush=N. This setting is useful in cases where an application hangs the system and requires the system to be rebooted. Setting this keyword guarantees that the trace file and trace entries are not lost by the reboot. | ||
DB2TRCSYSERR |
| Default=1, values: 1 - 32767 | Specifies the number of system errors to trace before the client turns off tracing. The default value traces one system error, after which, trace is turned off. | ||
DB2YIELD | Windows 3.1 | Default=N,
Values: Y, N | Specifies the behavior of the Windows 3.1 client while communicating with a remote server. When N is set, the client will not yield the CPU to other Windows 3.1 applications, and the Windows environment is halted while the client application is communicating with the remote server. You must wait for the communications operation to complete before you can resume any other tasks. When set to Y, your system functions as normal. It is recommended that you try to run your application with db2yield=YES. If your system crashes, you will need to set db2yield=NO. For application development, ensure your application is written to accept and handle Windows messages while waiting for a communications operation to complete. | ||
System Environment | |||||
DB2INSTANCE | All | Default=db2instdef on OS/2, Windows 95, and Windows NT. | The environment variable used to specify the instance that is active by default. On UNIX, users must specify a value for DB2INSTANCE. | ||
DB2INSTPROF | OS/2, Windows 95, and Windows NT |
| The environment variable used to specify the location of the instance directory on OS/2, Windows 95 and Windows NT operating systems, if different than DB2PATH. | ||
DB2PATH | OS/2, Windows 95, and Windows NT |
| The environment variable used to specify the directory where the product is installed on OS/2, Windows 95 and Windows NT operating systems. By default it is set to x:\sqllib\win on Windows 95 and Windows NT. | ||
Communications | |||||
DB2COMM | All, server only | Default= null,
Values: any combination of APPC,IPXSPX, NETBIOS,NPIPE, TCPIP | Specifies the communication managers that are started when the database manager is started. If this is not set, no DB2 communications managers are started at the server. | ||
DB2NBADAPTERS | OS/2 and Windows NT, server only | Default=0,
Range: 0-15, Multiple values should be separated by commas | Used to specify which local adapters to use for DB2 NetBIOS LAN communications. Each local adapter is specified using its logical adapter number. | ||
DB2NBCHECKUPTIME | OS/2 and Windows NT, server only | Default=1 minute,
Values: 1-720 | Specifies the time interval between each invocation of the NetBIOS
protocol checkup procedure. Checkup time is specified in minutes.
Lower values will ensure that the NetBIOS protocol checkup runs more often, freeing up memory and other system resources left when unexpected agent/session termination occurs. | ||
DB2NBINTRLISTENS | OS/2 and Windows NT, server only | Default=1,
Values: 1-10 Multiple values should be separated by commas | Specifies the number of NetBIOS listen send commands (NCBs) that will be
asynchronously issued in readiness for remote client interrupts. This
flexibility is provided for "interrupt active" environments to ensure that
interrupt calls from remote clients will be able to establish connections when
servers are busy servicing other remote interrupts.
Setting db2nbintrlistens to a lower value will conserve NetBIOS sessions and NCBs at the server. However, in an environment where client interrupts are common, you may need to set db2nbintrlistens to a higher value in order to be responsive to interrupting clients.
| ||
DB2NBBRECVBUFFSIZE | OS/2 and Windows NT, server only | Default=4096 bytes,
Range: 4096-65536 | Specifies the size of the DB2 NetBIOS protocol receive buffers. These buffers are assigned to the NetBIOS receive NCBs. Lower values conserve server memory, while higher values may be required when client data transfers are larger. | ||
DB2NBBRECVNCBS | OS/2 and Windows NT, server only | Default=10,
Range: 1-99 | Specifies the number of NetBIOS "receive_any" commands (NCBs) that the
server will issue and maintain during operation. This value may be adjusted
depending on the number of remote clients to which your server is connected.
Lower values will conserve server resources.
| ||
DB2NBRESOURCES | OS/2, server only | Default=(not set) | Specifies the number of NetBIOS resources to allocate for DB2 use in a multi-context environment. This variable is restricted to multi-context client operation. | ||
DB2NBSENDNCBS | OS/2 and Windows NT, server only | Default=6,
Range: 1-720 | Specifies the number of send NetBIOS commands (NCBs) that the server will reserve for use. This value may be adjusted depending on the number of remote clients your server is connected to. Setting db2nbsendncbs to a lower value will conserve server resources. However, you may need to set it to a higher value to prevent the server from waiting to send to a remote client when all other send commands are in use. | ||
DB2NBSESSIONS | OS/2 and Windows NT, server only | Range: 5-254 | Specifies the number of sessions that DB2 should request to be reserved
for DB2 use. The value of db2nbsessions can be set to request a
specific session for each adapter specified using db2nbadapters.
| ||
DB2NBXTRANCBS | OS/2 and Windows NT, server only | Default=5 per adapter,
Range: 5-254 | Specifies the number of "extra" NetBIOS commands (NCBs) the server will need to reserve when the db2start command is issued. The value of db2nbxtrancbs can be set to request a specific session for each adapter specified using db2nbadapters. | ||
DB2NETREQ | Windows 3.1 | Default=3,
Range: 0-25 | Specifies the number of NetBIOS requests that can be run concurrently on Windows 3.1 clients. The higher you set this value, the more memory below the 1MB level will be used. When the concurrent number of requests to use NetBIOS services reaches the number you have set, subsequent incoming requests for NetBIOS services are held in a queue and become active as the current requests complete. If you enter 0 (zero) for db2netreq, the Windows database client issues NetBIOS calls in synchronous mode using the NetBIOS wait option. In this mode, the database client allows only the current NetBIOS request to be active and does not process another one until the current request has completed. This can affect other application programs. The 0 value is provided for backwards compatibility only. It is strongly recommended that 0 not be used. | ||
DB2SERVICETPINSTANCE | OS/2 and Windows NT | Default=(not set) | Used to support incoming APPC connections from DB2 workstation V.1
clients or from the DB2 MVS database. When the db2start command is
invoked, the instance specified will start the APPC listeners for the
following TP names:
| ||
DCE Directories | |||||
DB2DIRPATHNAME | OS/2 and UNIX |
| Specifies a temporary override of the DIR_PATH_NAME parameter value in
the database manager configuration file. If a directory server is used and the
target of a CONNECT statement or ATTACH command is not explicitly cataloged,
then the target is concatenated with DB2DIRPATHNAME (if specified) to form the
fully qualified DCE name.
| ||
DB2CLIENTCOMM | OS/2 and UNIX |
| Specifies a temporary override of the DFT_CLIENT_COMM parameter value in the database manager configuration file. If both DFT_CLIENT_COMM and db2clientcomm are not specified, then the first protocol found in the object is used. If either one or both of them are specified, then only the first matching protocol will be used. In either case, no retry is attempted if the first connect fails. | ||
DB2CLIENTADPT | OS/2 | Default=null,
Range: 0-15 | Specifies the client adapter number for NETBIOS protocol on OS/2 operating systems. The db2clientadpt value overrides the DFT_CLIENT_ADPT parameter value in the database manager configuration file. | ||
DB2ROUTE | OS/2 and UNIX |
| Specifies the name of the Routing Information Object the client uses when it connects to a database with a different database protocol. The db2route value overrides the ROUTE_OBJ_NAME parameter value in the database manager configuration file. | ||
Command Line Processor | |||||
DB2BQTIME |
| Default=1 second,
Maximum value: 1 second. | Specifies the amount of time the command line processor front end will sleep before checking if the back end process is active and establishing a connection to it. | ||
DB2BQTRY |
| Default=60 retries,
Minimum value: 0retries. | Specifies the number of times the command line processor front end process tries to determine whether the back end process is already active. It works in conjunction with db2bqtime. | ||
DB2IQTIME |
| Default=5 seconds,
Minimum value: 1 second. | Specifies the amount of time the command line processor back end process waits on the input queue for the front end process to pass commands. | ||
DB2RQTIME |
| Default=5 seconds,
Minimum value: 1 second. | Specifies the amount of time the command line processor back end process waits for a request from the front end process. | ||
MPP Configuration | |||||
DB2NODE | All | Default=(not set)
Values: 1-999 | Specifies which node of the MPP server instance you want to connect or attach to. | ||
DB2_SELECT_TIMEOUT_INIT | AIX | Default=1000 microseconds,
Range: 10-999990 | Specifies the initial wait time in microseconds that Fast Communication
Manager (FCM) waits to examine the local and remote work queues to detect
messages. When there are no messages on a given pass, timeout starts. When a
message is detected by FCM the timeout value is immediately reset to
db2_select_timeout_init.
| ||
DB2_SELECT_TIMEOUT_INCR | AIX | Default=10,
Range: 10-999990 | Specifies the increment on wait time between passes each time that Fast
Communication Manager (FCM) examines the local and remote work queues and
finds no messages.
| ||
DB2_SELECT_TIMEOUT_MAX | AIX | Default=30000 microseconds,
Range: 10-999990 | Specifies the maximum time between passes that Fast Communication Manager
(FCM) will wait to examine the local and remote work queues.
| ||
Miscellaneous | |||||
DB2ADMINSERVER | OS/2, Windows 95 and Windows NT, and UNIX |
| Specifies which DB2 instance is set up as the DB2 Administration Server. | ||
DB2AUTOSTART | UNIX, server only | Default=(not set),
Value: YES | Specifies whether the instance will be auto-started on the system reboot or not. To auto-start an instance, set this environment variable to YES. To disable auto-starting an instance, unset this environment variable. By default, db2autostart is not set. | ||
DB2_AVOID_PREFETCH | All | Default=OFF | Specifies whether or not prefetch should be used during crash recovery. If db2_avoid_prefetch=ON, prefetch is not used. | ||
DB2CHKPTR |
| Default: OFF,
Values: ON or OFF | Specifies whether or not pointer checking for input is required. | ||
DB2CLIINIPATH |
|
| Used to override the default path of the DB2 CLI/ODBC configuration file (db2cli.ini) and specify a different location on the client. The value specified must be a valid path on the client system. | ||
DB2DEFPREP | All | Default=NO,
Values: ALL, YES, or NO | Simulates the runtime behavior of the DEFERRED_PREPARE precompile option for applications that were precompiled prior to this option becoming available. For example, if a DB2 v2.1.1 or earlier application were run in a DB2 v2.1.2 or later environment, db2defprep could be used to indicate the desired 'deferred prepare' behavior. | ||
DB2DMNBCKCTLR | NT | Default=null | If DB2 is installed on a backup domain controller, setting
db2dmnbckctlr=YES allows DB2 to use the security database
on the backup domain controller, thereby reducing LAN traffic.
| ||
DB2_GRP_LOOKUP | NT | Default=null | Specifies which NT security mechanism will be used to enumerate the groups that a user belongs to. | ||
DB2_INDEX_FREE |
| Default=10,
Range: 0-60 | Specifies the amount of free space left on all index pages during CREATE INDEX (both SQL and LOAD). | ||
DB2LOADREC |
|
| Used to override the location of the load copy during roll forward. If the user has changed the physical location of the load copy, db2loadrec must be set before issuing the roll forward. | ||
DB2LOCK_TO_RB |
|
| Specifies whether lock timeouts cause the entire transaction to be rolled-back, or only the current statement. If db2lock_to_rb is set to STATEMENT before the db2start command is issued, locked timeouts cause only the current statement is rolled back. Any other setting results in transaction rollback. | ||
DB2_MMAP_READ | AIX | Default=ON,
Values: ON, OFF | Used in conjunction with db2_mmap_write to allow DB2 to use mmap as an alternate method of i/o. In most environments, mmap should be used to avoid operating system locks when multiple processes are writing to different sections of the same file. However, if you do not have a parallel i/o problem, you may set db2_mmap_read and db2_mmap_write to OFF to free up the AIX memory segment. | ||
DB2_MMAP_WRITE | AIX | Default=ON,
Values: ON, OFF | Used in conjunction with db2_mmap_read to allow DB2 to use mmap as an alternate method of i/o. In most environments, mmap should be used to avoid operating system locks when multiple processes are writing to different sections of the same file. However, if you do not have a parallel i/o problem, you may set db2_mmap_read and db2_mmap_write to OFF to free up the AIX memory segment. | ||
DB2NTNOCACHE | Windows NT | Default=(not set),
Value: If present, must be set to 1 | Specifies whether or not DB2 will open database files with a NOCACHE option. If db2ntnocache=1, file system caching is eliminated. If db2ntnocache is not set, the operating system caches DB2 files. This applies to all data except for files that contain LONG FIELDS or LOBS. Eliminating system caching allows more memory to be available to the database so that the bufferpool or sortheap can be increased. | ||
DB2NTREMOTEPREG | Windows 95 and Windows NT | Default=(not set)
Value: Any valid Windows 95 or Windows NT machine name | Specifies the remote machine name that contains the Win32 registry list of DB2 instance profiles and DB2 instances. The value for db2remotepreg should only be set once after DB2 is installed, and should not be modified. Use this variable with extreme caution. | ||
DB2NTWORKSET | Windows NT | Default=1,1 | Used to modify the minimum and maximum working set size available to DB2.
When you are not in a paging situation, a process's working set can grow
as large as needed. When paging occurs, the maximum working set that a process
can have is approximately 1 MB.
Specify db2ntworkset for DB2 using the syntax db2ntworkset=min,max, where min and max are expressed in megabytes. | ||
DB2PRIORITIES |
|
| Controls the priorities of DB2 processes and threads. The value for db2priorities must be set before the db2start command is issued. | ||
DB2RAWLOGS | UNIX | Default=OFF | Allows the use of raw disk devices such as logs. When using raw database logs you must set db2rawlogs=TRUE before issuing the db2start command. | ||
DB2_RR_TO_RS |
| Default=NO,
Values: YES, NO | Specifies whether or not next-key locking occurs on access to user tables. When set to YES, next-key locking will not be activated. | ||
DB2SORCVBUF | Windows 95 and Windows NT | Default=32767 | Specifies the value of TCP/IP receive buffers on Windows 95 and Windows NT operating systems. | ||
DB2SORT | All, server only | Default=null | Specifies the location of a library to be loaded at runtime by the load utility. The library contains the entry point for functions used in sorting indexing data. Use db2sort to exploit vendor-supplied sorting products for use with the LOAD utility in generating table indexes. The path supplied must be relative to the database server. | ||
DB2SOSNDBUF | Windows 95 and Windows NT | Default=32767 | Specifies the value of TCP/IP send buffers on Windows 95 and Windows NT operating systems. | ||
DB2SYSTEM | Windows NT, OS/2, UNIX |
| Specifies the name that is used by your users and database administrators
to identify the DB2 server system. If possible, this name should be unique
within your network.
This name is displayed in the system level of the Control Center's object tree to aid administrators in the identification of server systems that can be administered from the Control Center. When using the 'Search the Network' function of the Client Configuration Assistant, DB2 discovery returns this name and it is displayed at the system level in the resulting object tree. This name aids users in identifying the system that contains the database they wish to access. A value for db2system is set at installation time as follows:
| ||
DB2THREADIF |
|
| Disables DB2's support for multi-threaded applications. We recommend that db2threadif not be used, except under the the direction of IBM service. | ||
DB2UPMPR | OS/2 | Default=ON,
Values: ON or OFF | Specifies whether or not the UPM logon screen will display onscreen when the user enters the wrong userid or password on OS/2. |