Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When to use MTS??

Status
Not open for further replies.

JBuckley

Programmer
Jul 26, 2001
4
US
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??
 
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.

 
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.
 
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 B-)
 
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?
 
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.
 
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 ?

Thanks
Sarang Malwatkar
smalwatk@indcon.com


 
IIS 4.0 can fullfil 10 concurrent request in one point of time.
 
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
ObjectContext.SetAbort
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
Thanks.
Jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top