Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


When to use MTS??

When to use MTS??

When to use MTS??

We've developed simple proof of concept projects using IIS/SQL Server  and a web front end using ASP that updated the dB directly.  These did not use MTS but worked well all be it with a low volume of users.

We've now got the task of developing a time recording/reporting system for about 150 people to use.

Given the number of users and nature of the system should we be looking at MTS??   If not at what level should we be looking at MTS??  

RE: When to use MTS??

You have to win with using MTS for one reason: with MTS, a transaction will be complete or no transaction will be recorded.  An example, if you have some record the make in a database, and the second record doesnt work, the transaction will be canceled.

RE: When to use MTS??

JBuckley -

To extend on what Tiyan said, MTS will help you reduce the chances of a concurrency error when performing adds and updates to your database.  It does this by doing what is known as a two-phase commit.  Phase one consists of the transaction monitor (MTS) telling the database(s) to prepare for an update.  Once all databases have replied with an "OK, go ahead", MTS then issues the 2nd phase, which tells the databases to actually write the changes out.

There is another benefit to MTS, and that is it's connection pooling.  VB6 doesn't have the ability to take advantage of it, but VC++ v6, and the .NET family will.  This will allow you to handle more users with the same or fewer database connections, as MTS will hold onto the connections and re-use them for the next caller.  This reduces the load on the database server, since it doesn't have to create and tear-down connections all the time.

Hope this helps.
Chip H.

RE: When to use MTS??

One more benefit of using MTS (Component Services for those of you using Win2K) that was not metioned is that it acts as an "Object Request Broker". Basically what that means is that you can have several hundred client applications using objects within MTS and MTS only needs to create objects for those who are actually in Call. Those clients that jus twant an object reference and are not yet incall will only get a context wrapper. MTS is able to pass around the same object to multiple clients which will cut down on the required resources but it also requires developers to develop stateless components.

- Jeff Marler

RE: When to use MTS??

I use VC6 for my compiler, and I use a MSADO21 COM object for accessing a SQL 2000 server (The server is Win2K). Does this automatically mean I'm using MTS, or do I have to do something more?

RE: When to use MTS??

Dragonslayer -

Your C++ objects need to implement the COM interface(s) needed by MTS before they can participate in a transaction.  Simple database access via MDAC (ADO/RDO, etc) isn't enough.

You'd also have to register your COM object with MTS, which _can_ be done programatically, but most people do it manually through the MTS console.

Chip H.

RE: When to use MTS??

We have a 1-page asp application that will update 2-3 Oracle tables. How many concurrent users will the IIS suppport without need for MTS? At what user load should we use MTS ?

Sarang Malwatkar

RE: When to use MTS??

IIS 4.0 can fullfil 10 concurrent request in one point of time.

RE: When to use MTS??

hi all,
I am using MTS to check db connection.

Application("ConnectionString") = contains the provider details.
set conn = Server.CreateObject("ADODB.Connection")
conn.open Application("ConnectionString")
if conn.Errors.Count > 0 then
end if
sub OnTransactionAbort()
     Response.Redirect "error.htm"
end sub

The above code   has following problems
1.The SQL Server  not found  is still coming  even after giving the Sub OnTransactionAbort event handler.
2.The redirection is not going to error.htm file which is in the same directory.
Can anybody please explain this.
email :jais2g@rediffmail.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close