home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC68475 Status: Closed

.NET EXCEPTION IS THROWN WHEN DB2.NET TRACE IS ENABLED

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
Enabling a DB2.NET Trace via the environment variables 
DB2NMPTRACE and DB2NMPCONSOLE will cause a 
System.ObjectDisposedException to be thrown, with the following 
call stack: 
 
at System.IO.__Error.WriterClosed()\r\n at 
System.IO.StringWriter.Write(Char[] buffer, Int32 index, Int32 
count)\r\n 
at System.IO.TextWriter.WriteLine(String value)\r\n 
at System.IO.TextWriter.SyncTextWriter.WriteLine(String 
value)\r\n 
at System.Console.WriteLine(String value)\r\n 
at IBM.Data.DB2.DB2Trace.ApiEntry(Int32 uiTraceFunction)\r\n 
at IBM.Data.DB2.DB2Connection.ResetConnPoolRef()\r\n 
at IBM.Data.DB2.DB2ConnPool.FreeDB2ConnPool()\r\n 
at IBM.Data.DB2.DB2ConnPool.Finalize() 
 
The trace itself will still be created and the application will 
work as usual, however an exception gets thrown by the DB2.NET 
data provider when the trace is enabled and that should not be 
the case.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* Enabling a DB2.NET Trace via the environment                 * 
* variablesDB2NMPTRACE and DB2NMPCONSOLE will cause            * 
* aSystem.ObjectDisposedException to be thrown, with           * 
* thefollowing call stack:.at                                  * 
* System.IO.__Error.WriterClosed()at                           * 
* System.IO.StringWriter.Write(Char[] buffer, Int32index,Int32 * 
* count)at System.IO.TextWriter.WriteLine(String               * 
* value)atSystem.IO.TextWriter.SyncTextWriter.WriteLine(Stringva 
* System.Console.WriteLine(String value)at                     * 
* IBM.Data.DB2.DB2Trace.ApiEntry(Int32 uiTraceFunction)at      * 
* IBM.Data.DB2.DB2Connection.ResetConnPoolRef()at              * 
* IBM.Data.DB2.DB2ConnPool.FreeDB2ConnPool()at                 * 
* IBM.Data.DB2.DB2ConnPool.Finalize()..The trace itself will   * 
* still be created and the applicationwill work as usual,      * 
* however an exception gets thrown by theDB2.NET  data         * 
* provider when the trace is enabled and thatshould not be the * 
* case.                                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 v9.7, Fixpak 3                                * 
****************************************************************
Local Fix:
The error for the most part can be ignored.  However to prevent 
the exception from occurring you can keep DB2NMPTRACE=1 set, but 
unset DB2NMPCONSOLE and take a trace by piping the results to a 
file.  This will only work if the application is a stand alone 
executable that can be invoked from a command prompt. 
 
For example: 
 
testconn20.exe "database=sample;" > nmptrace.txt
available fix packs:
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
First fixed in DB2 UDB Version 9.7, Fixpak 3
Workaround
see LOCAL FIX
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC77550 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
06.05.2010
12.10.2010
12.10.2010
Problem solved at the following versions (IBM BugInfos)
9.7.
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.3 FixList
9.7.0.3 FixList