SwitchDb2trace IBM data server driver configuration keyword
The SwitchDb2trace keyword enables the cli application to turn the db2 trace on and off through the application.
- db2cli.ini keyword syntax:
- Not available.
- Equivalent IBM® Data Server Provider for .NET connection string keyword
- Not available.
- IBM data server driver configuration file (db2dsdriver.cfg) syntax
- <parameter name="SwitchDb2trace" value="on -f <filename>"/>
- Default setting:
- Usage notes:
SwitchDb2trace can be specified only in global section and can take 3 possible values:
- "on -f <filename>" or "on -l <buffersize>": If -f option is specified, trace will start dumping the data to the file specified. If -l option is specified, it will create the buffer of the specified size and dump the data there.
- "dmp <filename>": If the user turns on the trace with -l option, then the user has to modify the cfg file to specify this option and dump the data to the file, before turning off the trace.
- "off": Turns off the running db2 trace facility.
Permissions are not validated on the given filename. The application is responsible to give the full file name which has the correct permissions to write to the file.
The functionality of the TraceRefreshInterval has been enhanced to allow the application to turn on/off the trace using SwitchDb2trace keyword and any of the above given values. When a positive value is specified in the global section of the db2dsdriver.cfg file, one thread has been created to monitor the db2dsdriver.cfg file for any modifications of the SwitchDb2trace keyword. If the TraceRefreshInterval is not specified, modifications are not considered to the SwithDb2trace keyword after the application has started.