COM+不支持Oracle吗?在用事务的时候出错。 [red]300分相送![/red](300分)

  • 主题发起人 主题发起人 starbzj
  • 开始时间 开始时间
S

starbzj

Unregistered / Unconfirmed
GUEST, unregistred user!
[red]
我用delphi做的COM+组件,在COM+组件不需要事务的时候没有问题,一旦设置事务为
“需要”时, 就会出现错误“MTS ERROR 1002:failure to create dispen in function OraMtsSvcGet”。
我用的数据库是Oracle8i,发现oracle8i 8.1.6和oracle8i 8.1.7都有这样的问题,而采用
SQL SERVER则没有这样的问题。
[/red]
 
安装
oracle manager for microsoft transaction server
 
同意沉香屑
安装
oracle manager for microsoft transaction server
 
Using Oracle with Microsoft Transaction Server and COM+
--------------------------------------------------------------------------------
The information in this article applies to:

Microsoft Transaction Server 2.0
Microsoft COM+, version 1.0
--------------------------------------------------------------------------------
SUMMARY
This article replaces previousdo
cuments that described how to use Oracle with COM+/Microsoft Transaction Server, including thedo
cumentation that accompanied the Microsoft Transaction Server 2.0 release.
COM+/Microsoft Transaction Server components can access Oracle 7, Oracle 8, and Oracle 8i database servers. They can access Oracle database servers on Microsoft Windows NT and Microsoft Windows 2000, Unix, and other platforms. They can access Oracle Workgroup Servers, Oracle Enterprise Servers, and Oracle Parallel Servers.
NOTE: Due to problems with MTS/COM+ using older versions of Oracle Client, the minimum version of Oracle Client now supported is 8.1.7. Oracle Client 8.1.7 is still able to access older versions of Oracle Server, however you should contact Oracle Support for more information on this.
The following sections list the recommended order of installation of the software for COM+/Microsoft Transaction Server components to work with Oracle Databases. If youdo
not perform the installations in this exact order, components may not work as expected because of configuration problems.


MORE INFORMATION

For Windows 2000
To ensure that COM+ components work with Oracle, follow these steps:
Install Windows 2000.

Install Oracle Client 8.1.7 with patch 8.1.7.1.5. Please contact Oracle for information on how to install the latest patch.

Install Oracle Net8 with the latest patches.

Install Microsoft Data Access Components (MDAC) 2.6 Service Pack 1 (SP1) or later.

Update the client software registry keys. (See "Update Oracle Client Software Registry Keys" later in thisdo
cument.)

For Windows NT 4.0
To ensure that transactional components work with Microsoft Transaction Server, follow these steps:
Install Windows NT with with Service Pack 6a or later.

Install Oracle Client 8.1.7 with patch 8.1.7.1.5. Please contact Oracle for information on how to install the latest patch.

Install Oracle Net8 with the latest patches.

Install the Windows NT Option Pack.

Install Windows NT Service Pack 6a (SP6a).

Install Microsoft Data Access Components (MDAC) 2.6 Service Pack 1 (SP1) or later.

Update the client software registry keys. (See "Update Oracle Client Software Registry Keys," later in thisdo
cument.)

For additional information on these steps, see the "Set Up Oracle Support" section of this article.
NOTE: All of the version numbers listed in thisdo
cument were current at the time that thedo
cument was written. Microsoft strongly recommends that you use the most current versions and patches of all Oracle and Microsoft software. Earlier versions of some of the components listed in thisdo
cument may function adequately in some circumstances but not in others.
Set Up Oracle Support
To set up Oracle to work with transactional COM+/Microsoft Transaction Server components, use the following procedure.
Install Oracle database server software on your database server system. If your COM+/Microsoft Transaction Server application accesses an Oracle database on Windows NT, Windows 2000, or Unix, ensure that the latest Oracle patch is installed on that system. You can obtain the latest Oracle patches for Windows NT/2000 from Oracle's Support site. Locate http://metalink.oracle.com/. Log in, and choose patches on the left hand navigation pane. Search for the latest patches by Choosing the Product family as Oracle Server, and the Platform as MS Windows NT/2000. Please contact Oracle for information on how to install the latest patch.
NOTE: Microsoft recommends that you install Oracle Server and COM+/Microsoft Transaction Server on separate computers.

Enable Oracle XA Transaction Support
If you are using Oracle 8/8i:
Make sure that you have V$XATRANS$ and the DBA_PENDING_TRANSACTIONS views created on your Oracle 8/8i database.

The Oracle system administrator must grant SELECT access to the public for the DBA_PENDING_TRANSACTIONS view.

Configure Enough Concurrent Distributed Transactions
In the Oracle Instance Manager, from the View menu, click Advanced Mode, and then
select Initialization Parameters in the left pane. In the right pane, select Advanced Tuning, and then
increase the distributed_transactions parameter to allow more concurrent Microsoft Transaction Server transactions to update the database at a time. Please refer to "Configure Oracle to Support a Large Number of Connections" for more information later in the article.

Configure Integrated Security
If your COM+/Microsoft Transaction Server components always supply a login ID and password when they connect to Oracle databases, then
you are not using integrated security. This is true whether your applications specify the login ID and password directly or indirectly through a DSN. In either case, you are not using integrated security and can ignore this step.
If you use integrated security, you must configure Microsoft Distributed Transaction Coordinator (MSDTC) to run under a login ID and password 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 allows an Oracle database to rely on Windows NT or Windows 2000 authen
tication to validate database users. This permits a user to log on to Oracle without supplying a separate login ID or password. Users can maintain one login ID and password for both Windows NT/Windows 2000 and Oracle.
NOTE: For integrated security, the userid in the connection string must to be a slash ("/"). Otherwise, all logins fail. For example:
cn.Open "PROVIDER=MSDAORA.1;DATA SOURCE=TESTORA;USER ID=/;PASSWORD=;"
If you run the MSDTC/COM+ system on a Microsoft Cluster Server cluster, then
the account under which MSDTC runs should also be a member of the Cluster Administrator Group for Microsoft Cluster Server.
To configure the login ID for MSDTC, use this procedure: From the Start menu, point to Settings, and then
click Control Panel. Start the Services utility.do
uble-click MSDTC. Select Log On As and specify a login ID and password. Use the Oracle security administration tools to ensure that the login ID you specify is authorized to open your Oracle database.
For more information on Oracle's integrated Windows NT/Windows 2000 security facilities, consult your Oracledo
cumentation.

Configure Oracle "Multi-Threaded Server" Support
You must configure the Oracle "Multi-Threaded Server" feature if you want to open a database link to a remote Oracle database. This is essential because Oracle Database uses XA transaction support, the Oracle database must be able to move the XA transaction between processes (in the general case), so it cannot have any operating system file descriptors open but rather 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 properly, Oracle will report the error message:
ORA-24777: Cannot create migratable transaction
NOTE: Oracle refers to the Multi-Threaded Server feature with the acronym "MTS." Microsoftdo
cumentation sometimes refers to "Microsoft Transaction Server" with the acronym "MTS." The only relationship between these two terms is the one described above.

Configure Oracle to Support More Connections
If you want to create more than a fewdo
zen connections to an Oracle database, you must configure the Oracle server to support additional database connections. See "Configure Oracle to Support a Large Number of Connections" in the "Administration of Oracle and Microsoft Distributed Transaction Coordinator" section. Please refer to "Configure Oracle to Support a Large Number of Connections" for more information later in the article.


Install Oracle Client Software. Install Oracle client software with the latest patches on your COM+/Microsoft Transaction Server system.
The following versions of the Oracle client with the latest patches work properly with transactional COM+/Microsoft Transaction Server components:

Oracle Client 8.1.7 with the latest patch, 8.1.7.1.5

IMPORTANT: Make sure that you install Oracle Net8 when you install Oracle client.
Also, when using Oracle 8.1.7,do
not install "Oracle Services for MTS" if you are using Microsoft OLEDB/ODBC drivers. Oracle Services for MTS are not required for COM+/MTS transactional components to work properly with Oracle Database.
Customers often upgrade these Oracle patch releases on the system that contains their Oracle database but fail to install the Oracle patch release on the system that contains their COM+/Microsoft Transaction Server components. Oracle has corrected several bugs that affect XA transactional client support;
installation of the latest Oracle patch releases on your COM+/Microsoft Transaction Server system is essential. You can obtain the latest Oracle patches for Windows NT from Oracle's Support site. Locate http://metalink.oracle.com/. Log in, and choose patches on the left hand navigation pane. Search for the latest patches by Choosing the Product family as Oracle Server, and the Platform as MS Windows NT/2000. Please contact Oracle for information on how to install the latest patch.


Install Microsoft Transaction Server 2.0.
NOTE: Ignore this step for Windows 2000.
Install Microsoft Transaction Server 2.0. Todo
this, install the Windows NT 4 Option Pack. When you install Microsoft Transaction Server 2.0, the following software is installed:

Microsoft Transaction Server 2.0, including the Microsoft Oracle Call Interface (OCI) .dll file (Mtxoci.dll)

Microsoft ODBC 3.5 Driver Manager

Microsoft ODBC Driver for Oracle

ActiveX Data Objects (ADO)

Install Windows NT 4.0 Service Pack 6a.
NOTE: Ignore this step for Windows 2000.
You must install the Windows NT 4.0 Option Pack release before you install the Windows NT 4.0 Service Pack 6a release. This is essential because the Window NT 4.0 Service Pack Setup program will only update Microsoft Transaction Server and MSDTC if the Windows NT 4.0 Option Pack has previously been installed.
Install the Windows NT 4.0 Service Pack 6a release, which includes corrections for several XA-related MSDTC problems.
NOTE: It is critical to install Windows NT 4.0 Service Pack 6a whenever you install or reinstall the Windows NT Option Pack.

Install Microsoft Data Access Components 2.6 Service Pack 1 or Later.
NOTE: Install MDAC 2.6 Service Pack 1 for a Windows 2000 Machine. (MDAC 2.5 is preinstalled with Windows 2000.)
You can obtain Microsoft Data Access Components 2.6 Service Pack 1 or later from the Microsoft Web site http://www.microsoft.com/data Click thedo
wnload link to access the "Universal Data Accessdo
wnloads" section.
Once you install MDAC, you can use Component Checker to see if there are any installation problems. Component Checker is designed to help you determine installed version information and diagnose installation issues with MDAC. Component Checker runs on the following operating systems: Microsoft Windows 95, Microsoft Windows 98, Windows NT 4.0, and Windows 2000. Only 32-bit and 64-bit platforms are supported. Component Checker has been updated to include MDAC 2.6 data. You can obtain this tool from the following Microsoft Web site:

http://www.microsoft.com/data/download.htm
Update Oracle Client Software Registry Keys.
WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.
For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT or Windows 2000, you should also update your Emergency Repair Disk (ERD).
If you use Oracle 8 client software, modify the values of the following registry keys as necessary to make sure they match those specified as follows:

Oracle Windows NT or Windows 9x Windows2000
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"
Test Installation and Configuration of COM+/MTS Support for Oracle
After you install and configure Oracle Support (as described in the previous section, "Set Up Oracle Support") you must validate your Oracle installation. You can use the following tools to validate the configuration:
Oracle Stress tool

Oracle Test program

Both of these tools use Oracle's OCI XA interfaces in much the same way as Microsoft COM+/Microsoft Transaction Server uses them. The Oracle Test program determines whether you can use Oracle's XA facility to connect to an Oracle database. These programs use standard Oracle interfaces and transaction facilities. Theydo
not use COM+/Microsoft Transaction Server or MSDTC. Therefore, failure of ANY of the test programs indicates that your Oracle system is improperly installed or configured. If the test programs fail, you should reinstall and reconfigure Oracle or contact Oracle Support Services for assistance.
After you have successfully completed these tests, you can use the Sample Bank application to test the setup (see "Use the Sample Bank Application to Validate Oracle Installation and Configuration," later in this article). You can also write a sample application of your own to test whether or not it works properly.

OracleStress Tool
You can use the OracleStress program todo
the following:
Check the Oracle client/server configuration.

Stress test Oracle Server.
To Obtain the OracleStress Program
The following file is available fordo
wnload from the Microsoftdo
wnload Center. Click the file name below todo
wnload the file:

OraStress.exe
For more information about how todo
wnload files from the Microsoftdo
wnload Center, please visit thedo
wnload Center at the following Web address
http://www.microsoft.com/downloads/search.asp
and then
click How to use the Microsoftdo
wnload Center.
Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.
You can use the C++ compiler to compile the source code. If you recompile the Oracle Stress program, Microsoft recommends that you call the resulting program "OracleStress.exe". The instructions that follow assume that you use that name.
To Run the OracleStress Program
Verify that you have installed all the recommended software mentioned in the previous sections of this article.

Open an MS-DOS command prompt and go to the folder where OracleStress.exe is located.

For Help on how to use the tool, type the following command:
C:> OracleStress.exe
Syntax to use with the OracleStress program:

OracleStress.exe -S<server> -Q<SQL> [-U<username>] [-P<password>]
[-T<threads>] [-I<iterations>] -[V<version>] [-N] [-W] [-L]
[-F<Log File Name>]
-S - Name of oracle server to connect to.
-Q - SQL statement that each thread will execute.
-U - Optional. Username. Defaults to "scott".
-P - Optional. Password. Defaults to "tiger".
-T - Optional. Number of threads to apply stress with. Defaults to "1".
-I - Optional. Number of iterations per thread. Defaults to "100".
-V - Optional. Version. Specifies Oracle version number. Can be one of: 7, 8, or 8i. Defaults to 8.
-N - Optional. If specified, disables the use of XA transactions.
-W - Optional. If specified, disables the display of warning level XA error messages.
-L - Optional. If specified, open and close connection at each iteration.
-F - Optional. Log file name. Defaults to "Ostress.txt".
Example:
C:>OracleStress -SMyOracleServer -Q"Insert into Order Values (1, 'My order')" -UMyUserName
-PMySpecialPassword -T10 -V8i
The generated output file defaults to Ostress.txt. You can open it with Microsoft Notepad and see if it successfully executed.

If you get any trace files with Oracle errors, contact Oracle Support Services to resolve issues before using the COM+/Microsoft Transaction Server application.

Tips to Use the Oracle Stress Program for Stress Testing Oracle Server
The SQL statement should be the same as (or similar to) the most complex queries in your application.

The number of threads (-T) should be three times the estimated maximum estimated concurrent connections open at any time in your application. For example, if maximum number of concurrent open connections in your application is 10, then
the value of number of threads would be 30.

Specify a high number of iterations to keep the number of threads busy to test the reliability/performance of the server.

NOTE: If the Oracle Stress program can connect to your Oracle database server without error, it is very likely that COM+/Microsoft Transaction Server will work with Oracle also. If the Oracle Test program reports any errors, you should follow these steps:
Document the exact error message that the Oracle Stress program displays.

Examine the Oracle trace file that was produced when you ran the Oracle Stress program. The Oracle trace information is located in the *.trc file. The Oracle trace file contains extended error information that is extremely helpful in diagnosing problems.

Contact Oracle Support Services for assistance.

Oracle Test Program
After 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 called TestOracleXAConfig.exe and one for Windows 2000 called Msdtcora.exe.
To Obtain the Oracle Test Program for COM+ on Windows 2000
You can obtain the source and object code from the Platform SDK or from the Microsoftdo
wnload Center. The following file is available fordo
wnload from the Microsoftdo
wnload Center. Click the file name below todo
wnload the file:

DTCOra.exe
For more information about how todo
wnload files from the Microsoftdo
wnload Center, please visit thedo
wnload Center at the following Web address
http://www.microsoft.com/downloads/search.asp
and then
click How to use the Microsoftdo
wnload Center.
Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.
NOTE: TestOracleXAConfig.exe is the tool to use to verify the Oracle configuration and troubleshoot problems related to Oracle prior to Windows 2000. For Windows 2000, use Msdtcora.exe, which replaces TestOracleXaConfig.exe. This tool uses the registry keys specified under "Update Oracle Client Registry Keys" earlier in this article, for Windows 2000.
To Obtain the Oracle Test Program for MTS on Windows NT
You can obtain both the source and object code for the Oracle Test program for Oracle 8 from ftp://ftp.microsoft.com/bussys/viper/Utilities/OracleTestProgram/Oracle8/.
NOTE: The Oracle Test program for Oracle 7 is installed automatically when Microsoft Transaction Server is installed. You can obtain both the source and object code for the Oracle Test program for Oracle 7.3 from ftp://ftp.microsoft.com/bussys/viper/Utilities/OracleTestProgram/Oracle7.3/.
You can use the C++ compiler to compile the source code for Oracle 8. If you recompile the Oracle Test program, Microsoft recommends that you call the resulting program "TestOracleXaConfig.exe". The instructions that follow assume that you use that name.
To Run the Oracle Test Program
Verify that you have installed all of the correct versions of the software, as described in "Set Up Oracle Support," earlier in this article.

Create an ODBC data source name (DSN) that refers to your Oracle database. Ensure that your DSN uses the Microsoft Oracle ODBC driver.

Ensure that you have enabled Oracle XA support as described in the "Enable Oracle XA Transaction Support" section under "Set Up Oracle Support" in this article.

Delete all existing Oracle trace files from the computer that contains the COM+/Microsoft Transaction Server components that access the Oracle database. The easiest way todo
this is to use Windows Explorer to locate and delete all *.trc files. If the Oracle Test program fails, the trace files can help you determine the source of the problem. If you delete all obsolete trace files, you make it easier to find any newly created ones.

From the MS-DOS command prompt, run the Oracle Test program (Msdtcora.exe or TestOracleXaConfig.exe) and supply your Oracle server user ID, password, and service_name. For example:

C:>msdtcora.exe -U<user id> -P<Password> -S<Service_Name as contained in the TNS file>.
-or-
C:>TestOracleXaConfig.exe -U<user id> -P<Password> -S<Service_Name as contained in the TNS file>
If you run the test program with no parameters, it displays Help information that describes the required parameters. The test program displays information about each Oracle operation that it performs and indicates whether each operation was successful.

NOTE: If the Oracle Test program can connect to your Oracle database server without error, then
it is very likely that COM+/Microsoft Transaction Server will work with Oracle also. If the Oracle Test program reports any errors, follow these steps:
Document the exact error message that the Oracle Test program displays.

Examine the Oracle trace file that was produced when you ran the Oracle Test program. The Oracle trace information is located in the *.trc file. The Oracle trace file contains extended error information that is extremely helpful in diagnosing problems.

Contact Oracle Support Services for assistance.

Use the Sample Bank Application to Validate Oracle Installation and Configuration
After you have used the Oracle Test program to validate your Oracle installation and configuration, you should use the Sample Bank application that is supplied with Microsoft Transaction Server to ensure that Microsoft Transaction Server can access your Oracle database.
To Use the Sample Bank Application to Validate Oracle Support
Use the Oracle Test program provided by Microsoft Transaction Server to verify that your Oracle system is installed and configured correctly. If the Oracle Test program reports any error, you must correct that problem before proceeding.

On the Oracle database server, create a table named "Account". The following example demonstrates how to set up the Account table.

Owner scott
Name of Table Account
Column 1 Name AccountNo of type NUMBER
Column 2 Name Balance of type NUMBER
Populate the Account table with at least two rows. The following table illustrates how to populate the table.

AccountNo Balance
1 1000
2 1000
On the Oracle database server, create a table named "Receipt". The following example demonstrates how to set up the Receipt table.

Owner scott
Name of Table Receipt
Column 1 Name NextReceipt of type NUMBER
Populate the Receipt table with at least one row. The following table illustrates how to populate the table.

NextReceipt
1000
Use the ODBC configuration utility to create a file DSN. Name the file DSN "MTSSamples". Next, manually update the DSN file to add the user's password. The following example demonstrates how to add the user's password to a file DSN:

[ODBC]
DRIVER=Microsoft ODBC for Oracle
UID=scott
PWD=mypassword
ConnectString=myserver
SERVER=myserver
Save the file DSN and run the Sample Bank client.

Administer Oracle and Microsoft Distributed Transaction Coordinator
Change the User ID Under Which MSDTC Runs
Microsoft Distributed Transaction Coordinator maintains information in the secure portion of the Windows NT or Windows 2000 registry. It uses this information when it performs recovery with XA-compliant databases, including Oracle. If you change the user ID under which Microsoft Distributed Transaction Coordinator executes, you ensure that Microsoft Distributed Transaction Coordinator can still access the information that it has previously stored in the secure portion of the registry. If you change Microsoft Distributed Transaction Coordinator's user ID, and MSDTC is unable to access the information in the secure registry, the following message will appear in the Windows NT event log:
XATM log object failed to set log encryption key
You can correct this problem as follows:
Stop Microsoft Distributed Transaction Coordinator.

Change the user ID for Microsoft Distributed Transaction Coordinator back to its previous value. Alternatively, you can assign a user ID that is a member of the administrative group. To change the user ID and password, start the Services program in Control Panel,do
uble-click the entry for MSDTC, and change the log on as value.

Restart Microsoft Distributed Transaction Coordinator.

Configure Oracle to Support a Large Number of Connections
If you want to create more than a fewdo
zen connections to an Oracle database, you must configure the Oracle server to support additional database connections.
You may experience one or more of the following errors if youdo
notdo
this:
Failures on SQLConnect calls.

Failures to enlist on the calling object's transaction, which may result in any of the following errors in the Oracle trace file:

Too many sessions

TNS server failed to locate the server name

Too many distributed transactions

Timeouts while waiting for database locks. This is likely to occur if the configured number of locks is insufficient for the number of concurrently active transactions.

Record collision due to locks held by in-doubt transactions.

If you experience any of these problems, consider increasing the following Oracle server configuration parameters:


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
Sessions
The value for sessions should typically be three times the total number of database connections that you expect your applications to make.
Queuesize
If the queuesize for the Oracle Listener process is inadequate, the Listener sometimes falls behind and rejects database open requests. This happens if the Listener receives too many connection requests and its queue overflows. A client that encounters this error reports the error message "ORA-12541: No Listener," and the client log or trace files show the "ECONREFUSED" message.
To correct this problem:
Stop the Oracle Listener on the system that contains the Oracle database server.

Increase the QUEUESIZE parameter in the Listener.ora, Tnsnet.ora, or Names.ora files on the Oracle database server system. Choose the queuesize based on the number of simultaneous, or nearly simultaneous, connections that you anticipate. Microsoft suggests that you select a generous value for QUEUESIZE because the Oracle 7.3 system typically opens three database sessions and Oracle8/8i opens two database sessions for each transactional database connection that your application opens. As a result, the Oracle Listener queue can become full and overflow. For example, to accommodate 100 requests, change the Listener.ora file as follows:

QUEUESIZE = 100
Restart the Oracle listener.

Known Limitations of COM+/MTS Support for Oracle
COM+/MTS and "Oracle Services for MTS"
Oracle Services for MTS is not required for COM+/MTS applications to work if you are using Microsoft OLEDB/ODBC provider.do
not install Oracle Services for MTS while installing Oracle 8i Client. Microsoftdo
es not support this configuration and the applications may not work properly if you install Oracle Services for MTS with Microsoft ODBC/OLEDB provider. Please contact Oracle Support for any issues related to using Oracle Services for MTS.
Oracle 8i and OLE Transactions
Oracle 8i supports OLE transactions. This feature requires the use of Oracle's ODBC driver. Please contact Oracle for information on the recommended configuration for to use this feature, required patches and related issues.
Microsoft Oracle ODBC Driver and Oracle 8
Currently, the Microsoft Oracle ODBC driver (Msorcl32.dll)do
es not work with the Compaq Alpha Oracle 8 client software. This may be changed in a future release.
Oracle Ociw32.dll Corrupts MSDTC During Startup
This problem occurs because both Microsoft Transaction Server and MSDTC must load the Oracle Ociw32.dll file on their main thread beforedo
ing any operation that might access an Oracle database. Microsoft Transaction Server must load Mtxoci.dll because your application may have to open a connection to an Oracle database. MSDTC must load Mtxoci.dll because it may need to perform Oracle database recovery. Because Microsoft Transaction Server cannot predict whether your application may want to use an Oracle database, it always loads the Ociw32.dll file. Ociw32.dll must load unconditionally at initialization because of the way that Oracle is implemented on Windows NT. Oracle's implementation on Windows NT monitors all thread attaches. Oracle insists on seeing all thread attaches and will only accept database open requests from threads for which it has seen the initial thread attach.
You can circumvent this problem in the following way:
If you never use Oracle with Microsoft Transaction Server or MSDTC, you can rename or delete the Microsoft Oracle database support .dll file (Mtxoci.dll). When Microsoft Transaction Server and MSDTC are initiated, they look for and load Mtxoci.dll. The Microsoft Mtxoci.dll file then
loads the Oracle Ociw32.dll file. Microsoft Transaction Server and MSDTC continue to work properly if they cannot locate and load the Mtxoci.dll file. However, they cannot access or recover an Oracle database if this .dll file is absent.
NOTE: Check to make sure that youdo
n't have multiple copies of Ociw32.dll on your COM+/Microsoft Transaction Server system. If you have multiple copies, the wrong version of the .dll file may be loaded, which can lead to unexpected behavior of the application.
The third-party products discussed in this article are manufactured by vendors independent of Microsoft;
we make no warranty, implied or otherwise, regarding these products' performance or reliability.




REFERENCES
For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
Q246006 INFO: Oracle TRC Files and MTS
Q230145 FIX: Mtxoci.dll Logging Support Enabled
Q191168 INFO: Error: '-2147168246 (8004d00a)' Failed to Enlist on Calling Object's Transaction
Q193941 INFO: Location of Oracle's Public FTP Site

Additional query words: kbMTS kbOracle KbClientServer
Keywords : KbClientServer kbCOMPlus kbMTS kbMTS200 kbOracle kbWinDNA kbGrpCom kbDSupport
Version : winnt:2.0;
:1.0
Platform : winnt
Issue type : kbinfo
Technology : kbvcSearch





Last Reviewed: Tuesday, February 13, 2001


 
red老兄,我的答案已经给你了,而且真的能解决问题,为何不给分啊
!!!!
 
你把那么长的文档扔过来就算是解决问题了吗?起码总结出一个最简单可行的方案出来才算
是帮人解决了问题呀,要不然直接使用BDE还更方便呢。
 
实际操作上您只要进行以下操作:
1。在oracle817的目录下搜索xaview.sql并执行该SQL语句。
2。在应用服务器安装mdac2.6 service pack,文章上有地址。
3。修改应用服务器上的注册表项,按照文章操作即可。
如此,即可解决该问题。
 
once老兄,这篇文章我是早就看过,也按照它上面的步骤来做了,但是问题依旧啊。
1、我在oracle817的目录下搜索xaview.sql并已经了执行该SQL语句。
2、我的应用服务器mdac的版本还是2.7的。应该说也没有问题吧。
3、我修改了WIN2000的注册表项,
[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSDTC/MTxOCI]
"OracleXaLib"="oraclient8.dll"
"OracleSqlLib"="orasql8.dll"
"OracleOciLib"="oci.dll"
 
难道我们这里没有高手吗?
 
平凡人想到的是如果用ADO不行,就用BDE。事实是:BDE连接Oracle工作得非常好,在COM+
中也能很好地完成各项工作,这就足够了。如果非要一条道走到黑,又要条条道都走得通,
这种高手估计在哪儿都很少。
 
你应该用BDE.
 
多人接受答案了。
 
后退
顶部