Avoiding database contention?

Filed under: Programming, Transact-SQL (T-SQL) — SQL Stan at 10:02 am on Thursday, July 26, 2007

Q: I am actually .Net professional. I want to get around some Lakhs of records from SQL server 2005 by using ADO.Net.For this I want to use the Disconnected Data Access techniqe (i.e. Data set). My actual problem is using DataSet it is not possible to get that much amount of data, So please provide me a code of Stored procedure with which i want to do the Paging (each on of 500 Records).

Kevin Kline says: Hello, I’m assuming you mean “locks” here. 500 records is not in the least a large amount of records, so I’m surprised that ADO.Net won’t allow you to get and manipulate this amount of records. Since I’m not a ADO.Net programmer, I can’t give you any help with your ADO code. On the other hand, you should be able to ge the records you want without locking issues by issuing your SELECT statement using the NOLOCKS hint. Read about NOLOCKS in the SQL Server Books On-Line. I also like the article www.sql-server-performance.com/lock_contention_tamed_article.asp.

Technorati Tags:
, , ,


No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>