PC Review


Reply
Thread Tools Rate Thread

ADO.Net and transaction locking

 
 
Robert Strickland
Guest
Posts: n/a
 
      30th Aug 2007
Earlier today I was in a discussion with the team's DBA on where explicit
database transaction locks should be placed - in the .Net application or in
the stored procedures. This can up when we ran into some concurrency
problems for our web application. Is here any guidelines or standards on
where the best place is for explicit locks? We use SQL Server 2000 and 2005
only (no Oracle and MySql). However, we do have several databases that make
up the datasource for the applications. All of the T-SQL code is in stored
procedures.

Also, with the CLR now in SQL Server 2005, is there push to move business
code from the business layer directly into SQL Server?

Thanks
Bob


 
Reply With Quote
 
 
 
 
Mary Chipman [MSFT]
Guest
Posts: n/a
 
      31st Aug 2007
As a general rule, it's always better to have explicit transactions
executing on the server, not from the client. You have more control
using stored procedures (error handling, wait queues, etc) than you do
from the client where more round trips are involved. As far as pushing
business code to the server, that's not what the CLR was designed for.
It's useful for procedural code that would otherwise require
non-performant server-side cursors or the like. T-SQL was never a true
programming language, and the CLR fills in the gaps.

-mary

On Thu, 30 Aug 2007 13:14:23 -0400, "Robert Strickland"
<(E-Mail Removed)> wrote:

>Earlier today I was in a discussion with the team's DBA on where explicit
>database transaction locks should be placed - in the .Net application or in
>the stored procedures. This can up when we ran into some concurrency
>problems for our web application. Is here any guidelines or standards on
>where the best place is for explicit locks? We use SQL Server 2000 and 2005
>only (no Oracle and MySql). However, we do have several databases that make
>up the datasource for the applications. All of the T-SQL code is in stored
>procedures.
>
>Also, with the CLR now in SQL Server 2005, is there push to move business
>code from the business layer directly into SQL Server?
>
>Thanks
>Bob
>

 
Reply With Quote
 
Robert Strickland
Guest
Posts: n/a
 
      3rd Sep 2007
Thanks

"Mary Chipman [MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> As a general rule, it's always better to have explicit transactions
> executing on the server, not from the client. You have more control
> using stored procedures (error handling, wait queues, etc) than you do
> from the client where more round trips are involved. As far as pushing
> business code to the server, that's not what the CLR was designed for.
> It's useful for procedural code that would otherwise require
> non-performant server-side cursors or the like. T-SQL was never a true
> programming language, and the CLR fills in the gaps.
>
> -mary
>
> On Thu, 30 Aug 2007 13:14:23 -0400, "Robert Strickland"
> <(E-Mail Removed)> wrote:
>
>>Earlier today I was in a discussion with the team's DBA on where explicit
>>database transaction locks should be placed - in the .Net application or
>>in
>>the stored procedures. This can up when we ran into some concurrency
>>problems for our web application. Is here any guidelines or standards on
>>where the best place is for explicit locks? We use SQL Server 2000 and
>>2005
>>only (no Oracle and MySql). However, we do have several databases that
>>make
>>up the datasource for the applications. All of the T-SQL code is in stored
>>procedures.
>>
>>Also, with the CLR now in SQL Server 2005, is there push to move business
>>code from the business layer directly into SQL Server?
>>
>>Thanks
>>Bob
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem locking a transaction record vandy Microsoft Access Form Coding 5 13th May 2008 05:03 PM
Locking during ADO .net transaction Darren Microsoft ADO .NET 1 13th Feb 2007 03:59 AM
ADO.NET Transaction Locking =?Utf-8?B?c2NvdHQ=?= Microsoft ADO .NET 4 20th Apr 2006 08:43 PM
"Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction." Ollie Riches Microsoft C# .NET 3 11th Mar 2005 05:23 PM
"Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction." Ollie Riches Microsoft ADO .NET 3 11th Mar 2005 05:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:31 AM.