Skip Headers

Oracle® Services for Microsoft Transaction Server Developer's Guide
10g Release 1 (10.1) for Windows

Part Number B10114-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:

Improving Microsoft Transaction Server Application Performance

You can improve performance when you optimize the programming methods. 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 then 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 databases, use database links and connect to one database from the COM component.


See Also:

"OCI Integration with Microsoft Transaction Server Overview" for more information about using ORAMTSSvcGet()

Managing Microsoft Transaction Server Connections

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

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.

Figure 6-1 identifies the connection pool locations and the registry parameters associated with the client side pool.

Figure 6-1 Connection Pool Registry Parameters

Description of 82mts004.gif follows
Description of the illustration 82mts004.gif

Table 6-1 describes the connection pool registry parameters.

Table 6-1 Connection Pool Registry Parameters

Client Side Parameter Description Default Value Entry
ORAMTS_CONN_POOL_TIMEOUT This parameter enables you to set how long a connection remains idle and available for reuse in the client side connection pool before timing out. After timing out, the connection is released. 120 seconds
ORAMTS_SESS_TXNTIMETOLIVE The portion of the connection associated with ORAMTS_SESS_TXNTIMETOLIVE specifies the time to live for Oracle client/server pooled connection established using OraMTSSvcGet(). This time is the time that a connection lives after being released by OraMTSSvcRel(). 120 seconds
ORAMTS_NET_CACHE_TIMEOUT The portion of the connection associated with ORAMTS_CONN_POOL_TIMEOUT is responsible for session issues such as username and password (that is, the logon session). The portion of the connection associated with ORAMTS_NET_CACHE_TIMEOUT is responsible for communication issues such as sending and receiving data (that is, the actual Oracle Net connection). Establishing a new Oracle Net connection requires more resources than using that connection to establish a logon session. It is advisable to keep this value set higher than the session timeout value associated with ORAMTS_CONN_POOL_TIMEOUT.

After ORAMTS_CONN_POOL_TIMEOUT times out, the portion of the connection associated with ORAMTS_NET_CACHE_TIMEOUT remains available for a slightly longer period of time. A server connection can then be reused by creating a new session with it.

120 seconds

Note: This value is in addition to the value you set for ORAMTS_CONN_POOL_TIMEOUT. For example, if you set ORAMTS_CONN_POOL_TIMEOUT to 180, and set ORAMTS_NET_CACHE_TIMEOUT to 60, the time period before a connection completely terminates is 240 seconds.

ORAMTS_NET_CACHE_MAXFREE This parameter enables you to set the maximum number of free server connections to maintain in the client-side connection pool at any given time. 5
ORAMTS_OSCREDS_MATCH_LEVEL This parameter enables you to set the degree of Windows security checking to perform on a connection when the OS_ROLES initialization parameter is set to true in the init.ora file.

When a user connects to the Oracle database (for example, with the CONNECT / command), there are certain database roles and privileges associated with their Windows username. When the user disconnects, the connection becomes idle and available in the pool. When another user enters the CONNECT / command, the Windows identity of both users must match or the second user can receive the same database roles and privileges as the first user. This is a security concern if the second user possesses only the CONNECT and RESOURCE database roles, but accidently receives the DBA database role associated with the first user.

For this situation, setting this parameter to OS_AUTH_LOGIN ensures that Windows security checking is performed. Furthermore, if OS_ROLES is set to true in the Oracle database, the roles of the operating system user are associated with a connection regardless of whether CONNECT / or CONNECT username/password is performed. To enable Windows security checking in this case, set this parameter to ALWAYS.

Windows security checking is a resource-intensive operation. There is always a cost associated with Windows verifying the operating system credentials prior to reusing a connection. For performance reasons, it is advisable to set this parameter to NEVER. However, if you set OS_ROLES to true or use operating system-authenticated connections, ensure that you set this parameter accordingly.

There are three possible values:
  • ALWAYS

    Windows security checking is always performed. This setting is the most secure, because it does not permit a second user to accidently receive the database roles and privileges of the first user.

  • OS_AUTH_LOGIN (default)

    Windows security checking is only done if the username and password are NULL. This is the default value.

  • NEVER

    No Windows security checking is performed. This setting is the least resource intensive of the three. Use this setting if you are not setting OS_ROLES to true or not using operating system-authenticated connections.


Increasing the Transaction Timeout Parameter on Windows NT

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 on Windows NT:

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

  2. Choose Start > Programs > Windows NT 4.0 Option Pack > Microsoft Transaction Server > Transaction Server Explorer.

    The Microsoft Management Console appears.

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

  4. Double-click Microsoft Transaction Server.

  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.

Description of mts13.gif follows
Description of the illustration mts13.gif

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.


See Also:

Appendix A, " Using Oracle Services for Microsoft Transaction Server on Windows Operating Systems" for information on increasing the transaction timeout parameter on Windows 2000

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 upon the database workload environment.

To verify initialization parameter file values:

  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 parameters are typically appropriate for running the Microsoft application demo. For creating and deploying .NET or COM-based applications, the values to which to set these parameters depend upon the anticipated workload for the database environment. For example, if you anticipate 100 concurrent connections to the Oracle database, consider setting both values to 200 to account for any 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.

To set initialization parameters:

  1. 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)

  2. Shut down the Oracle database:

    SQL> SHUTDOWN
    
    
  3. Restart the Oracle database:

    SQL> STARTUP
    
    
  4. Exit SQL*Plus:

    SQL> EXIT
    

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:

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

  2. Choose Start > Programs > WindowsNT 4.0 Option Pack > Microsoft Transaction Server > Transaction Server Explorer.

    The Microsoft Management Console appears.

  3. Double-click ConsoleRoot in the Microsoft Management Console Explorer window.

  4. Double-click Microsoft Transaction Server.

  5. Double-click Computers.

  6. Right-click My Computer.

    A menu appears with several options.

  7. Choose Start MSDTC.

    MS DTC starts.