.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Lock statistics

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :Sql Server
Hope this is the correct forum. I know you can collect real-time information about locks. But are there any historical data that can be fetched per database?

View Complete Post

More Related Resource Links

Lock statistics

Hope this is the correct forum. I know you can collect real-time information about locks. But are there any historical data that can be fetched per database?

Concurrent Affairs: Build a Richer Thread Synchronization Lock


In my last column, I showed the various thread synchronization mechanisms employed by the Microsoft® . NET Framework (see Concurrent Affairs: Performance-Conscious Thread Synchronization). I then examined the performance characteristics of all these mechanisms and determined that the Interlocked methods performed the best because the calling thread never has to transition to kernel mode.

Jeffrey Richter

MSDN Magazine March 2006

Memory Models: Understand the Impact of Low-Lock Techniques in Multithreaded Apps


Because the use of low-lock techniques in your application significantly increases the likelihood of introducing hard-to-find bugs, it is best to use them only when absolutely necessary. Here Vance Morrison demonstrates the limitations and subtleties low-lock techniques so that if you are forced to use them you have a better chance of using them correctly.

Vance Morrison

MSDN Magazine October 2005

C++ Q&A: Performance Monitoring, Managed Extensions, and Lock Toolbars


In the June 2004 issue of MSDN®Magazine, I described a class called ShowTime that you can use to do simple performance monitoring for your app. ShowTime uses its constructor/destructor to record the start/stop times of its existence so you can instantiate it in a block of code like so: { ShowTime st(_T("Total time is:")); // some lengthy operation } .

Paul DiLascia

MSDN Magazine September 2004

Team System - VS2008 -- Performance testing statistics


Dear all,


I am new to using performance testing in team system VS2008.

Could you tell me that What is the steps needed in VS2008 to create performance testing if I have the Web Application Source Code??

So that I can know where or which function need the most time. 

Lock the window size to uniform in wpf

I have a window that contain a ViewBox. The ViewBox's Streach property is set to Uniform. And I want to set the window size to be uniform! that means the Height And Width properties are relative to each other.

ThreadPool with lock isn't thread safe

Hello, I'm having some problems with my code which apparently isn't thread safe at all. The problem is that it doesn't crash often, but of course it does when in production! I have twisted my mind around the problem for a month or so now, and I need some help in sorting out the problem. Well, the problem is that it isn't thread safe, and the collection (_subscribers) is modified while looping. The error says that it crashes in the method: SendRoundSettings. Here's part of the code (which I guess contains the error, as the other methods are pretty much identical): [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)] public class DuplexService : IDuplexService { private readonly object _syncRoot = new object(); private static Subscribers _subscribers = new Subscribers(); private static RoundSettings _currentRoundSettings = new RoundSettings() {CompetitionId = 1, NumberOfAthletesInRound = 0, Round = 0, SortDirection = SortDirection.ByStartNumber}; public void SendJudgeScore(CompetitionJudgeAthleteJump judgeScore) { ThreadPool.QueueUserWorkItem(state => { Subscribers clonedSubscribers = CloneSubscribers(); Console.WriteLine("Sending judgeScore to {0} client(s)", clonedSubscribers.Count(x => x.CompetitionId == judgeScore.CompetitionId));

How to lock tables during a transaction

Hi, is there a way do something like this:  BEGIN TRANSACTION --lock table1 --do work here --unlock table1 COMMIT TRANSACTION

Maintenance Update Statistics plan

Hi, I've created a maintenance plan for many databases with these tasks (SQL 2005) 1- shrink Database 2- Update Statistics 3- Cleanup History 4- Backup Database (Full) 5- Maintenance Cleanup task The maintenance plan failed at task Update Statics.  Here the error message : Error number : -1073548784 Error message : Executing the query "UPDATE STATISTICS [dbo].[LOG_DETAILS] WITH FULLSCAN " failed with the following error: "Could not continue scan with NOLOCK due to data movement.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. My question :How do I know which database is causing the problem and how can I fix the problem ? I don't know a dbo database? thanks,   Jasmin  

Why does RowLock result in a Page Lock

Hi, I am having a problem where even though I have indicated a rowlock it results in a page lock and a subsequent process is unable to access the table till the first process has commited.   Sample code is below.   Process 1 Begin Transaction SELECT EmpName FROM fEmployee WITH (ROWLOCK) WHERE EmpNo = 1 PRINT fEmployee.EmpName -- will print 'Sam' UPDATE fEmployee SET EmpName = 'Bob'  WHERE EmpNo = 1 .... .... .... Lots of other related processing takes place here and then finally COMMIT TRANSACTION Process 2 Begin Transaction SELECT EmpName FROM fEmployee WITH (ROWLOCK) WHERE EmpNo = 2 PRINT fEmployee.EmpName -- will print 'Rick' UPDATE fEmployee SET EmpName = 'Paul'  WHERE EmpNo = 2 .... .... .... Lots of other related processing takes place here and then finally COMMIT TRANSACTION When I run process 1 and process 2 at the same time, till process 1 commits the transaction, process 2 does not perform the Select and print the name. Why is this the case as they are both selecting different records and the Select has specifically indicated a RowLock. What I noticed was that when the rows are in the same page this problem occurs, while if the records are in different pages (assuming the data is large in the table and the gap between the empno's are large) it does not occur. Any help appreciated. Thanks

Cannot lock request 254,023

Hi, I have been running SSIS job for loading 26 million records from SAP source to SQL Server table having 20 columns. there are no transformations in my DFT. after DFT i have Execute SQL Task to get the target count. 26 million records have been successfully inserted into the table but job failed with below error:"Source: DFT_BW_TO_STAGING SAP BI Source     Description: Cannot lock request 254,023  End Error  DTExec: The package execution returned DTSER_FAILURE (1)." What could be the reason behind this result. Any help would be greatly appreciated.Das


HiI want for my siteThe statistics doThat is includedWho What IP address and what country and what the link is to enter my websiteChart and graph Monthly StatisticsGet statistics from search engineWhat a person looking for the word searchCountry name and profile resolution and operating systems and browsers can also be seenI have this codeBut all I need is not completePrivate Sub Application_Start(sender As Object, e As EventArgs) ' Code that runs on application startup Application("OnlineUsers") = 0 ' Code that runs on application startup End Sub Private Sub Session_Start(sender As Object, e As EventArgs) ' Code that runs when a new session is started Application.Lock() Application("OnlineUsers") = CInt(Application("OnlineUsers")) + 1 Application.UnLock() End Sub Private Sub Session_End(sender As Object, e As EventArgs) ' Code that runs when a session ends. ' Note: The Session_End event is raised only when the sessionstate mode ' is set to InProc in the Web.config file. If session mode is set to StateServer ' or SQLServer, the event is not raised. Application.Lock() Application("OnlineUsers") = CInt(Application("OnlineUsers")) - 1 Application.UnLock() End Sub

Sharepoint sub site lock

How to lock Sharepoint 2007 sub site.I used stsatm-o setsitelock it locks site collection. I want to lock only particular site only. Ex: If i want to lock http://sharepoint/site1 only lock on site1 not for Http://sharepoint Please suggest me object model code for this. Thakns Anil  

Job Execution times / statistics report ...

We have several sites (countries if you may call them) and each site has its own set of ERP databases (Progress database). We have designed ETL layers that are open and which can be invoked for each of these sites. On top of the ETL layers, we scheduled the SSIS packages via SQL jobs for each site and scheduled them to run at various times of the day based on the site operating hours. I want to now present the amount of time it takes to copy data from the ERP system into our SQL 2008 Staging and finally into our DataWarehouse. I can manually right click on the SQL jobs and get the timings, however, I want to automate this report so that we can look at it initially weekly and maybe monthly when things start to run smoothly. Any pointers or ideas? I know I can run SQL Profiler and capture the SQL behind this report, would it actually work? ThanksJagannathan Santhanam

Unknown error trying to lock file

Hi This error may have been reported in the forum before. If so I apologise for asking again, but I just can't find any reference to it (or any solution).This is using IE7, Vista Business 64bit, Word 2007To summerise: (step by step)1. We log into Sharepoint (from remote locations)2. We locate the list containing items with attached documents3. Selecting the document gives the "harmful..." message4. Microsoft Word loads up with a certificate warning (which we accept)5. We then are prompted to log in a second time.6. It then prompts with a certificate ("Select Certificate") dialog. (We select OK 3 times)7. Word opens the document in Reader view8. Document reports "Server document" at the top of the screen next to the "Edit Document" option.9. Choose "Edit Document"10. and we get "Unknown Error trying to lock file".The same sequence of events using Windows XP has no problems.Switching back to XP is not an option.Various threads scattered through the internet talk of various solutions from port numbers to running Word in XP sp2 compatible mode. None of these solve the problem. Can someone give me some indication of what is going wrong here. I'm not completely up to speed with sharepoint, but if you ask the questions, I'll dig out the answers.Best regardsRobert

SQL server 2005 lock requests/sec rising linearly non-stop

While running an application load test, I am observing some weird behavior. Lock requests/sec counter is increasing in a linear fashion throughout the whole test (duration 12 hours, load levels off to a constant level within first 10 minutes). The value reached 6 million at 12 hours. There was no apparent impact to the response time of the application. There was also no impact to lock wait time (200ms average). Database CPU slowly increased from 20% to about 30% at 12 hours. What could be causing such behaviour?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend