Article ID: 193893 - Last Review: February 16, 2007 - Revision: 8.3 Information about using Oracle with Microsoft Transaction Server and COM+ componentsThis article was previously published under Q193893 This article replaces previous documents that described how to use Oracle with Microsoft COM+ components and Microsoft Transaction Server (MTS), including the documentation that accompanied the release of Microsoft Transaction Server (MTS) 2.0.
On This PageSUMMARYYou can use COM+ and MTS components to access Oracle 7, Oracle 8, Oracle 8i, and Oracle 9i database servers. They can access Oracle database servers on Microsoft Windows NT, Windows 2000, UNIX, and other operating systems. They can access Oracle Workgroup Servers, Oracle Enterprise Servers, and Oracle Parallel Servers.
Note Because of problems with COM+ and MTS in older versions of Oracle Client, the minimum version of Oracle Client that is now supported is 8.1.7. Oracle Client 8.1.7 can still access older versions of Oracle Server. However, you must contact Oracle Support for more information. MORE INFORMATIONThe following sections list the recommended order of installation of the software for COM+ and MTS components to work with Oracle databases. If you do not perform the installations in this exact order, the components may not work as expected because of configuration problems. Windows 2000To make sure that transactional COM+ components work with Oracle, follow these steps:
Windows NT 4.0To make sure that transactional MTS components work with Oracle, follow these steps:
Note All the version numbers that are listed in this article were current at the time that the article was written. We strongly recommend that you use the most current versions and updates of all Oracle software and Microsoft software. Earlier versions of some of the components that are listed in this article may work adequately in some circumstances but not in others. Set up Oracle supportTo set up Oracle to work with transactional COM+ components and MTS components, follow these steps.Step 1: Install Oracle database server softwareInstall Oracle database server software on your database server system. If your COM+/MTS application accesses an Oracle database on Windows NT, Windows 2000, or UNIX, make sure that the latest Oracle update is installed on that system. To obtain the latest Oracle updates for Windows NT or Windows 2000, visit the following Oracle Web site:https://metalink.oracle.com
(https://metalink.oracle.com)
Log on to the site, and then select patches on the left navigation bar. To search for the latest updates, click Oracle Server as the Product family, and then select MS Windows NT/2000 as the operating system. For information about how to install the latest update, contact Oracle.
Note We recommend that you install Oracle Server and COM+/MTS on separate computers. Enable Oracle XA transaction supportIf you are using Oracle 8 or Oracle 8i, consider the following:
Configure sufficient concurrent distributed transactionsIn the Oracle Instance Manager, follow these steps:
Configure integrated securityNote If your COM+/MTS components always supply a login ID and a password when they connect to Oracle databases, you are not using integrated security. This is true whether your applications specify the login ID and the password directly or indirectly through a DSN. In either case, you do not use integrated security, and you can skip this step.If you use integrated security, you must configure Microsoft Distributed Transaction Coordinator (MSDTC) to run under a login ID and a password that is authorized to connect to your Oracle database. This is required because during database recovery, MSDTC opens your Oracle database to tell it the outcome of in-doubt transactions. Integrated security permits an Oracle database to rely on Windows NT or Windows 2000 authentication to validate database users. This enables a user to log on to Oracle without supplying a separate login ID or password. Users can maintain one login ID and one password for both Windows NT or Windows 2000 and Oracle. Note For integrated security, the user ID in the connection string must to be a slash (/). Otherwise, all logins fail: To configure the login ID for MSDTC, follow these steps:
Configure Oracle Multi-Threaded Server supportYou must configure the Oracle Multi-Threaded Server feature if you want to open a database link to a remote Oracle database. You must complete this step because the Oracle database uses XA transaction support. The Oracle database must be able to move the XA transaction between processes (in the general case), so that it cannot have any operating system file descriptors open. Instead, it must use a virtual circuit to connect to the remote database. Virtual circuits are only supported with Oracle Multi-Threaded Server.If the Oracle Multi-Threaded Server feature is not configured correctly, Oracle reports the following error message: ORA-24777: Cannot create migratable transaction Configure Oracle to support more connectionsIf you want to create more than several dozen connections to an Oracle database, you must configure the Oracle server to support additional database connections. For more information, see "Configure Oracle to support many connections" in the "Administer Oracle and MSDTC" section.Step 2: Install Oracle client software with the latest updatesInstall Oracle client software with the latest updates on your COM+/MTS system. Oracle Client 8.1.7, with the latest update, 8.1.7.1.5, works correctly with transactional COM+/MTS components.Important Make sure that you install Oracle Net8 when you install Oracle Client 8.1.7. Additionally, when you use Oracle 8.1.7, do not install Oracle Services for MTS if you are using Microsoft OLEDB/ODBC drivers. Oracle Services for MTS is not required for COM+/MTS components to work correctly with Oracle Database. Customers frequently upgrade these Oracle update releases on the system that contains their Oracle database, but they cannot install the Oracle update release on the system that contains their COM+/MTS components. Oracle has corrected several bugs that affect XA transactional client support. You must install the latest Oracle update releases on your COM+/MTS system. To obtain the latest Oracle updates for Windows NT, visit the following Oracle Web site: https://metalink.oracle.com
(https://metalink.oracle.com)
Log on to the site, and then select patches on the left navigation bar. To search for the latest updates, click Oracle Server as the Product family, and then select MS Windows NT/2000 as the operating system. For information about how to install the latest update, contact Oracle.
Step 3: Install MTS 2.0Install MTS 2.0. To do this, install Windows NT 4 Option Pack. When you install MTS 2.0, the following software is installed:
Step 4: Install Windows NT 4.0 SP 6aInstall the Windows NT 4.0 SP 6a release that includes corrections for several XA-related MSDTC problems.Important You must install Windows NT 4.0 Option Pack before you install Windows NT 4.0 SP 6a because the Window NT 4.0 Service Pack Setup program only updates MTS and MSDTC if Windows NT 4.0 Option Pack has already been installed. Note Ignore this step for Windows 2000. Step 5: Install MDAC 2.6 SP1 or laterInstall MDAC 2.6 SP1 or later for Windows 2000-based computers. To obtain MDAC 2.6 SP1 or later, visit the following Microsoft Web site:http://msdn2.microsoft.com/en-us/data/aa937712.aspx#MDAC
(http://msdn2.microsoft.com/en-us/data/aa937712.aspx#MDACDownloads)
Step 6: Use Component Checker to see if there are any installation problemsAfter you install MDAC, you can use Component Checker to see if there are any installation problems. Component Checker is designed to help you determine version information and diagnose installation issues with MDAC. Component Checker runs on the following operating systems:
http://msdn2.microsoft.com/en-us/data/aa937695.aspx
(http://msdn2.microsoft.com/en-us/data/aa937695.aspx)
Step 7: Update Oracle Client software registry keysImportant This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:322756
(http://support.microsoft.com/kb/322756/
)
How to back up and restore the registry in Windows For information about how to edit the registry, see the following topics in Registry Editor Help:
If you use Oracle 8.1.7 Client software, modify the values of the following registry keys to make sure they match those that are specified as follows: Oracle Windows NT or Windows 9x Windows 2000
Client
8.1.7 [HKEY_LOCAL_MACHINE\SOFTWARE [HKEY_LOCAL_MACHINE\SOFTWARE
\Microsoft\Transaction Server \Microsoft\MSDTC\MTxOCI]
\Local Computer\My Computer] "OracleXaLib"="oraclient8.dll"
"OracleXaLib"="oraclient8.dll" "OracleSqlLib"="orasql8.dll"
"OracleSqlLib"="orasql8.dll" "OracleOciLib"="oci.dll"
"OracleOciLib"="oci.dll"
Oracle Windows Server 2003
Client
9i [HKEY_LOCAL_MACHINE\SOFTWARE
\Microsoft\MSDTC\MTxOCI]
"OracleXaLib"="oraclient9.dll"
"OracleSqlLib"="orasql9.dll"
"OracleOciLib"="oci.dll"Test the installation and the configuration of COM+/MTS support for OracleAfter you install and configure Oracle support, you must validate your Oracle installation. You can use the following tools to validate the configuration:
After you have successfully completed these tests, you can use the Sample Bank application to test the setup (see the "Use the Sample Bank application to validate your Oracle installation and configuration" section). You can also write your own sample application to test the setup. Oracle Stress toolYou can use the Oracle Stress tool to do the following:
Obtain the Oracle Stress toolThe following file is available for download from the Microsoft Download Center:Collapse this image ![]() 119591
(http://support.microsoft.com/kb/119591/
)
How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.
You can use the C++ compiler to compile the source code. If you recompile the Oracle Stress tool, we recommend that you name the resulting program OracleStress.exe. Run the Oracle Stress toolTo run the Oracle Stress tool, follow these steps.Note The following steps assume that the program is named OracleStress.exe.
Tips to use the Oracle Stress tool for stress-testing Oracle ServerConsider the following tips when you use the Oracle Stress tool:
Oracle Test programAfter you install and configure Oracle support, you must use the Oracle Test program to validate your Oracle installation. The Oracle Test program is available in two versions, one for Windows NT named TestOracleXAConfig.exe, and another for Windows 2000 named Msdtcora.exe.Obtain the Oracle Test program for COM+ on Windows 2000You can obtain the source code and the object code from the Platform SDK or from the Microsoft Download Center.The following file is available for download from the Microsoft Download Center: Collapse this image ![]() 119591
(http://support.microsoft.com/kb/119591/
)
How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.
Note You can use the TestOracleXAConfig.exe tool to verify the Oracle configuration and to troubleshoot problems that are related to Oracle if you are running an operating system that is earlier than Windows 2000. If you are running Windows 2000, use the Msdtcora.exe tool. The Msdtcora.exe tool uses the registry keys that are specified in the Update Oracle Client software registry keys step for Windows 2000. Obtain the Oracle Test program for MTS on Windows NTTo obtain both the source code and the object code for the Oracle Test program for Oracle 8 and Oracle Test program for Oracle 7.3, visit the following Microsoft Download Center Web site:http://www.microsoft.com/downloads/details.aspx?FamilyId=791CA202-0641-426D-8977-4D639C8755B0
(http://www.microsoft.com/downloads/details.aspx?FamilyId=791CA202-0641-426D-8977-4D639C8755B0)
Note The Oracle Test program for Oracle 7 is installed automatically when you install MTS. You can use the C++ compiler to compile the source code for Oracle 8. If you recompile the Oracle Test program, we recommend that you name the resulting program TestOracleXaConfig.exe. Run the Oracle Test programNote The following steps assume that the program is named TestOracleXaConfig.exe.
Note If the Oracle Test program can connect to your Oracle database server without error, it is very likely that COM+/MTS will also work with Oracle. If the Oracle Test program reports any errors, follow these steps:
Use the Sample Bank application to validate your Oracle installation and configurationAfter you use the Oracle Test program to validate your Oracle installation and configuration, you must use the Sample Bank application that is supplied with MTS to make sure that MTS can access your Oracle database.Use the Sample Bank application to validate Oracle support
Administer Oracle and MSDTCChange the MSDTC user IDMicrosoft Distributed Transaction Coordinator (MSDTC) maintains information in the security-enhanced part of the Windows NT registry or the Windows 2000 registry. MSDTC uses this information when it performs recovery with XA-compliant databases, including Oracle. If you change the user ID under which MSDTC runs, you must make sure that MSDTC can still access the information that it previously stored in the security-enhanced part of the registry. If you change the MSDTC user ID, and MSDTC cannot access the information in the security-enhanced registry, you receive the following error message in the Windows NT event log: To correct this problem, follow these steps:
Configure Oracle to support many connectionsIf you want to create more than several dozen connections to an Oracle database, you must configure the Oracle server to support additional database connections. If you do not do this, one or more of the following problems may occur:
Oracle Configuration Parameter Recommended
Processes Three times the maximum number
of connections you expect to make
to the database
Sessions (1.1 * PROCESSES) + 5
Transactions (1.1 * SESSIONS)
Distributed_transactions Transactions
Dml_locks (4 * TRANSACTIONS)
MAX_TRANSACTION_BRANCHES 32 (OBSOLETE in Oracle 8i)
Open_cursors 1000
distributed_lock_timeout 300 (OBSOLETE in Oracle 8i)
Queuesize Read Queuesize section Set the session valuesThe value for sessions must typically be three times the total number of database connections that you expect your applications to make.Configure the QUEUESIZE parameterIf the QUEUESIZE parameter for the Oracle Listener process is not sufficient, the Listener process sometimes falls behind and rejects database open requests. This problem occurs if the Listener process receives too many connection requests and its queue overflows. A client that encounters this error reports the following error message:ORA-12541: No Listener
Known limitations of COM+/MTS support for OracleCOM+/MTS and Oracle Services for MTSOracle Services for MTS is not required for COM+/MTS applications if you are using the Microsoft OLEDB/ODBC provider. Do not install Oracle Services for MTS while you install the Oracle 8i client. We do not support this configuration and the applications may not work correctly if you install Oracle Services for MTS with the Microsoft ODBC/OLE DB provider. Contact Oracle Support for any problems that are related to using Oracle Services for MTS.Oracle 8i and OLE transactionsOracle 8i supports OLE transactions. This feature requires the use of the Oracle ODBC driver. Contact Oracle for information about the recommended configuration to use this feature, the required updates, and any related issues.Microsoft Oracle ODBC Driver and Oracle 8Currently, the Microsoft Oracle ODBC driver (Msorcl32.dll) does not work with the Compaq Alpha Oracle 8 client software. This limitation may be changed in a future release.Oracle Ociw32.dll corrupts MSDTC during startupThis problem occurs because both MTS and MSDTC must load the Oracle Ociw32.dll file on their main thread before they perform any operation that might access an Oracle database. MTS must load the Mtxoci.dll file because your application may have to open a connection to an Oracle database. MSDTC must load the Mtxoci.dll file because it may have to perform Oracle database recovery. Because MTS cannot predict whether your application may want to use an Oracle database, it always loads the Ociw32.dll file. The Ociw32.dll file must load unconditionally at initialization because of the way that Oracle is implemented on Windows NT. Oracle implementation on Windows NT monitors all thread attaches. Oracle insists on seeing all the thread that are attached and only accepts database open requests from threads whose initial thread attach it has seen.To work around this problem, you can rename or delete the Microsoft Oracle database support .dll file (Mtxoci.dll) if you never use Oracle with MTS or MSDTC. When MTS and MSDTC are initiated, they look for and then load the Mtxoci.dll file. The Mtxoci.dll file then loads the Oracle Ociw32.dll file. MTS and MSDTC continue to work correctly if they cannot locate and load the Mtxoci.dll file. However, they cannot access or recover an Oracle database if this .dll file is not present. Note Check to make sure that you do not have multiple copies of the Ociw32.dll file on your COM+/MTS system. If you have multiple copies, an incorrect version of the .dll file may be loaded and cause unexpected behavior. Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information. The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products. REFERENCES
For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
246006
(http://support.microsoft.com/kb/246006/
)
Oracle TRC files and MTS
230145
(http://support.microsoft.com/kb/230145/
)
FIX: Mtxoci.dll logging support enabled
191168
(http://support.microsoft.com/kb/191168/
)
Error "-2147168246 (8004d00a)" failed to enlist on calling object's transaction
193941
(http://support.microsoft.com/kb/193941/
)
Location of Oracle's public FTP site
| Article Translations
|

Back to the top

