Skip Headers
Oracle® Services for Microsoft Transaction Server Developer's Guide
10g Release 2 (10.2) for Microsoft Windows

Part Number B14320-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

6 Tuning Microsoft Transaction Server Performance

This chapter provides Microsoft Transaction Server performance tuning information.

This chapter contains these topics:

6.1 Improving Microsoft Transaction Server Application Performance

Optimizing the programming methods of your application improves its performance. For example, placing all code for a given transaction into one component object model (COM) component means you do not mark that component as transactional. This eliminates the overhead of going through Microsoft Transaction Server. You can subsequently use the Oracle commit or rollback functions to control that transaction in the component. If you are using the Oracle Call Interface (OCI), you can still use ORAMTSSvcGet(), but you can also use the ORAMTS_CFLG_NOIMPLICIT flag. If you are updating across two or more Oracle Database instances, use database links and connect to one database from the COM component.


See Also:

"OCIIntegration with Microsoft Transaction Server" for more information on using ORAMTSSvcGet()

6.2 Managing Microsoft Transaction Server Connections

When a .NET or COM component ends a session with the Oracle Database, the connection does not immediately terminate. Instead, it remains idle in a connection pool, where it is available for reuse by another component attempting a new connection to the Oracle Database.

6.2.1 Connection Pooling Registry Parameters

The idle period during which a connection is reusable reduces the resource costs associated with opening a new connection. The amount of time that the connection remains idle and available in the connection pool is determined by several registry parameter settings. You can modify these parameters on the computers on which the client Microsoft Transaction Server components are installed, in the file HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID:

ORAMTS_CONN_POOL_TIMEOUT The time, in seconds, that the connection remains idle and available for reuse in the client side connection pool, before timing out and being released. The default value of this parameter is 120 seconds.

ORAMTS_SESS_TXNTIMETOLIVE The time, in seconds, that the connection established using OraMTSSvcGet() remains alive in the client side connection pool after being released by an OraMTSSvcRel() call. The sum of the ORAMTS_CONN_POOL_TIMEOUT and ORAMTS_NET_CACHE_TIMEOUT values determines the actual time before a connection terminates completely. The default value of this parameter is 120 seconds.

ORAMTS_NET_CACHE_TIMEOUT The time, in seconds, that is used in session initialization and authentication, such as the username and password. ORAMTS_NET_CACHE_TIMEOUT is the time allocated to deal with communication issues such as sending and receiving data, the actual Oracle Net connection. Establishing a new Oracle Net connection requires more resources than using that connection to establish a logon session. Oracle recommends setting this parameter to a higher value than the with ORAMTS_CONN_POOL_TIMEOUT value. The sum of the ORAMTS_CONN_POOL_TIMEOUT and ORAMTS_NET_CACHE_TIMEOUT values determines the actual time before a connection terminates completely. The default value of this parameter is 120 seconds.

ORAMTS_NET_CACHE_MAXFREE The maximum number of free server connections that should be maintained in the client-side connection pool at a given time. The default value of this parameter is 5.

ORAMTS_OSCREDS_MATCH_LEVEL The level of Windows security checking implemented when the OS_ROLES initialization parameter in the init.ora file is true.

When a user establishes a connection to the Oracle Database using the CONNECT command, the Windows username is associated with specific database roles and privileges. When the user disconnects, this connection becomes idle and available in the pool. When another user enters the CONNECT command, if the Windows username is identical to the one used by the first user, the second user can receive the same database roles and privileges as the first user. This is a considerable security concern, especially if the second user possesses only the CREATE SESSION and RESOURCE database roles but receives the DBA privileges of the first user.

By default, the ORAMTS_OSCREDS_MATCH_LEVEL parameter value is OS_AUTH_LOGIN, and Windows security checking is performed only if the username and password are NULL.

The most secure setting for this parameter is ALWAYS, which ensures that Windows security checking is performed in all cases, and takes care of possible security breaches due to identical non-null Window usernames.

Because Windows security checking is a resource-intensive operation, you may wish to set the value of this parameter to NEVER. However, if you know that OS_ROLES is true, or if you use operating system-authenticated connections, you should avoid this option.

6.3 Increasing the Transaction Timeout Parameter

If transaction requests are timing out before completing, the transaction timeout parameter may be set too low. Increase the transaction timeout parameter to ensure that transactions have enough time to complete.

To increase the transaction timeout parameter:

  1. Go to the Windows computer on which Microsoft Transaction Server is installed.

  2. From the Start menu, select Programs, then Administrative Tools, then Component Services.

    The Component Services window appears.

  3. Double-click Console Root in the Component Services window so its tree structure expands.

  4. Double-click Component Services.

  5. Double-click Computers.

  6. Right-click My Computer.

    A menu appears with several options.

  7. Choose Properties.

    The My Computer Properties dialog box appears.

  8. Choose the Options tab.

  9. Enter a value in the Transaction Timeout field and click OK.

    The transaction timeout value is increased. For most environments, 60 seconds may be enough. However, if the transaction is competing with numerous concurrent transactions, this value may be too low.

6.4 Changing Initialization Parameter Settings

You may need to modify several initialization parameters to use the Oracle Database with Microsoft Transaction Server. The values to which to set these parameters are based on the database workload environment.

To verify initialization parameter file values, follow these steps:

  1. Ensure that you have SYSDBA privileges.

  2. Go to the computer on which the Oracle Database is installed.

  3. Start SQL*Plus:

    C:\> sqlplus /NOLOG
    
    
  4. Connect to the database as SYSDBA:

    SQL> CONNECT / AS SYSDBA
    
    
  5. Check the value for the SESSIONS parameter:

    SQL> SHOW PARAMETER SESSIONS
    
    
  6. Check the value for the PROCESSES parameter:

    SQL> SHOW PARAMETER PROCESSES
    
    

    The current settings for both SESSIONS and PROCESS parameters are typically appropriate for running the Microsoft application demo. For creating and deploying .NET or COM-based applications, the values for these parameters depend on the database environment's anticipated workload. For example, if you anticipate 100 concurrent connections to the Oracle Database, consider setting both values to 200 to accommodate a possible system overload. Ensure that you do not set these parameters too high, because they are resource-intensive.


    See Also:

    Oracle Database Reference for information about these parameters.

  7. Set the following initialization parameters to at least these values:

    • SESSIONS = 200 (or larger if anticipating heavier loads)

    • PROCESSES = 200 (or larger if anticipating heavier loads)

  8. Shut down the Oracle Database:

    SQL> SHUTDOWN
    
    
  9. Restart the Oracle Database:

    SQL> STARTUP
    
    
  10. Exit SQL*Plus:

    SQL> EXIT
    

6.5 Starting MSDTC

The Microsoft Distributed Transaction Coordinator (MS DTC) must be running to enable communication with Oracle Services for Microsoft Transaction Server.

To start MS DTC, follow these steps:

  1. On the computer where Microsoft Transaction Server is installed, from the Start menu, choose Programs, then Administrative Tools, then Services, then Microsoft Transacation Server.

    The Microsoft Management Console appears.

  2. Double-click Console Root in the Microsoft Management Console Explorer window.

  3. Double-click Microsoft Transaction Server.

  4. Double-click Computers.

  5. Right-click My Computer.

    A menu with several options appears.

  6. Choose Start MSDTC.

    MS DTC starts.