Setting Up the MTS Sample Bank Application

The Sample Bank application is a banking services application that credits, debits, and transfers money between accounts. Running the Sample Bank application allows you to test your installation of MTS with SQL Server 6.5 as well as practice package deployment and administration. Sample Bank has components written in Visual Basic, Visual C++, and Visual J++, and is located in the \MTS\Samples subdirectory. In addition, MTS provides an Active Server Page (ASP) that calls the Sample Bank components. This sample is called Bank.asp and is located in the \MTS\Samples\asp sub-directory.

The MTS Programmer’s Guide provides an extensive tutorial describing how to build Sample Bank components.

To run the Sample Bank application, you must:

Setting Up the Sample Bank Application

MTS automatically configures the ODBC data source for Sample Bank during setup. Since the local machine is used by default, you must have SQL Server 6.5 installed on your local machine.

By default, the MTS DSN points to SQL Server 6.5. If you are using a database other than SQL Server 6.5, you must delete the DSN and add a new DSN called MTSSamples that points to your database.

If you want to use a SQL Server installation on another machine, use the ODBC service icon in the Control Panel to modify your data source as follows:

Note that the Login ID and Password specified by the MTSSamples DSN are not used by Sample Bank. Sample Bank uses the "sa" account and null password. If your system administrator password is non-null or you want to specify a different login ID, you will have to modify the ODBC connection string in the Sample Bank source code.

To monitor the Sample Bank package components and transactions

  1. Double-click the Sample Bank package icon in the right pane of the MTS Explorer.
  2. Double-click the Components folder.
  3. On the View menu, click Status View to display usage information for the various components in the package.
  4. On the Window menu, click New Window.
  5. Re-arrange the new window so the two windows do not overlap. You can stack different windows by selecting either the Cascade or Tile Horizontally options from the Window menu.
  6. Click Transaction Statistics in the left pane of the new window.
  7. On the Action menu, click Scope to clear the check mark and hide the left pane. Now transactions statistics are displayed when transactional components are used.

To run the Bank client

  1. Make sure that Microsoft Distributed Transaction Coordinator (MS DTC) is running. Select My Computer in the left pane of the Transaction Server Explorer. Open the Action menu and click Start MS DTC if that option is enabled.
  2. Make sure that SQL Server is running. You can start SQL Server from Control Panel.
  3. On the Start menu, point to Programs, point to Microsoft Transaction Server, point to Samples, and click Bank Client. Arrange the Bank Client window so that it does not overlap the MTS Explorer windows.
  4. The form will default to credit $1 to account number 1. Click Submit. You should see a response with the new balance.
  5. Observe the MTS Explorer windows. You will notice that the component usage and transaction statistics windows have been updated.
  6. Experiment with the bank client and observe the statistics using different transaction types, servers, and iterations. The first transaction takes longer than subsequent transaction for the following reasons: