ODBC Driver Must Be Thread Safe If Used with MTS

Last reviewed: December 1, 1997
Article ID: Q177411
The information in this article applies to:
  • Microsoft Transaction Server version 1.0

SUMMARY

An ODBC driver must be thread-safe if it is to be used by a Microsoft Transaction Server (MTS) component. MTS components transparently use an ODBC connection obtained from a pool of connections that is managed by the ODBC Driver Manager. This allows MTS to use a pool of connections that it can keep very busy, without the cost of opening and closing a connection for each component that accesses the database. Connections are used by a component and then returned to the pool.

Connections in the pool that have not been used for a set period of time will be freed, to minimize the use of server resources. The ODBC connection pool manager uses a worker thread to check for connections that have not been used for a certain amount of time. By default, the CPTimeout (connection pool timeout) value is 60 seconds, but you can change it if you want. Because this worker thread is different than the thread that opened the connection, the ODBC driver must be able to handle disconnect requests (SQLDisconnect) coming from a thread other than the thread that called SQLConnect. Some ODBC drivers cause a general protection fault (GPF) when the disconnect request is from a different thread.

MORE INFORMATION

For more information, visit the Web sites at:


Additional query words: open database connectivity gp threadsafe
Keywords : kbusage TSrvODBC
Version : WINNT:1.0
Platform : winnt
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 1, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.