.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

How to troubleshoot locking LOCK_M_IX

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :Sql Server


I have batches of timeouts in SQL and system_health contains around 20 entries all waiting on LCK_M_IX. Majority of entries does not have SQL text entry associated with it ("Unable to retrieve SQL text").

I can run profiler and wait for next occurance (couple of time a day) but this is heavily used server and hence I can not log a lot of information. So which counter with which thresholds I need to put to find out why those locks are acquired and held?

View Complete Post

More Related Resource Links

C++ Q&A: Locking Column Headers, Implementing Singleton Classes


Prevent the sizing of the column headers in an ATL composite control. Also, see how you can share a small amount of simple data among multiple processes running on the same machine without Remoting.

Paul DiLascia

MSDN Magazine June 2003

Infopath Template Deployment Locking Existing Records




We are currently using SharePoint Server 2007 and have multiple InfoPath lists configured and one workflow tasks list. We have workflows configured for these InfoPath lists using Visual Studio to design these workflows and use InfoPath forms as the main document. After using the workflow items for a while we have changed and upgraded the workflow for the last year. The issue came when we tried to upgrade to the third version we designed.




We have two InfoPath lists in SharePoint that have identical form templates. In both lists there are around 3000-3100 InfoPath forms give or take. I modified the template to accommodate some new fields and promoted additional fields but did not go over the

Help Troubleshoot "Could not find Type in assembly"

I am attempting to create a CLR Procedure.  I was able to create the assembly, but I am unable to create a procedure on the assembly.  This is the error I receive: Msg 6505, Level 16, State 1, Procedure DINEServiceProc, Line 2 Could not find Type 'DINEServiceProc' in assembly 'DINEService' Here is the VB code to create the class: <code> Imports System Imports System.Data Imports System.Data.Sql Imports System.Data.SqlClient Imports System.Data.SqlTypes Imports Microsoft.SqlServer.Server Partial Public Class DINEServiceProc <Microsoft.SqlServer.Server.SqlProcedure()> _ Public Shared Sub ServiceProc(ByVal iMsg As String, ByVal iMsgType As String) Dim conn As SqlConnection 'Create an in-process connection to the instance of SQL Server conn = New SqlConnection("Context Connection=True") Dim DINEService As New DINEService Try conn.Open() DINEService.ProcessStartRequest(iMsg, iMsgType) Catch sqe As SqlException 'Console.WriteLine(sqe.Message) Return Finally conn.Close() End Try End Sub End Class </code> And here is the code to create the assembly and the procedure: <code> USE [ServiceBrokerTest] GO /****** Object: SqlAssembly [DINEService] Script Date: 01/03/2006 10:38:00 ******/ CREATE ASSEMBLY [DINEServiceProc] AUTHORIZATION [dbo] FROM 'D:\EHIT\ServiceBroker\DINEService\DINEService\bin\Debug\DINEService.dll' WITH PERMISSION_SET = SAFE

Locking and refreshing a database

I have a web site that accesses and updates a MySQL database. Occasionally I need to reload certain tables in that database from a local SQL Server database. How can I programmatically: a) Establish that no-one is actually using the database b) Lock the MySQL database to prevent users accessing the web database while the re-load is in progress c) Test whether the database is locked - i.e. prevent visitors from attempting to access / update the database while the refresh is in progress Many thanks.

How to troubleshoot a SharePoint 2010 error

When an error occurs within Microsoft SharePoint Foundation 2010 a Correlation ID will be displayed in the error message: This Correlation ID is logged within the SharePoint log files and you can use it to find out more details about the error that occurred.  The two pieces of information you will need from the error message above are the Correlation ID and the date and time of the error.  Once you have those two pieces of information, browse to the SharePoint log files on your SharePoint server located at: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS The log files will be labeled with a date time stamp so find the one that corresponds to the time frame of the error and then open this log file in Notepad (or the text editor of your choice) and search for the Correlation ID.  You will probably find it listed in several places, from the beginning GET request to when the error occurred, and finally to when the logging of correlation data stops.  Of course you are probably most interested in the error message but there will be more information in the log associated with the Correlation ID to help you find the root cause of the error.

Locking a field after it has been selected

Hi all, Does anyone know if it is possible to lock a field after it has been selected... For example, we have a field called sign-off date....if possible, we would like for that field to be locked once its selected so it can't be changed in the future...is this possible out of box? Any help is greatly appreciated. Thanks!

Troubleshoot Microsoft Connector 1.0 for SAP BI

I have installed the Microsoft Connector 1.0 for SAP BI (April 2009 feature pack) on a Windows 2008 R2 server with SQL 2008 SP1 (Cum Update 6). I have established an SAP BI Connection and SAP BI Data Source. The Data Source is able identify the OHS_Destination, Process Chain, and respective Columns. Confirm that the librfc32.dll is installed correctly. The Output of the Data Source is connected to a simple OLEDB destination. When executing the package, it fails at the SAP BI Data Source with the following errors: [SAP BI Source] Error: Microsoft.SqlServer.Dts.SapBw.Connectivity.ERPException: FAILED Execution failed.    at Microsoft.SqlServer.Dts.SapBw.Connectivity.RFCFunction.Execute()    at Microsoft.SqlServer.Dts.SapBw.Components.OHSExtractor.ExtractNow(Boolean InRuntimeMode, String GatewayHost, String GatewayService, String ProgramID, String ProcessChain, String DestinationName, String ExecutionMode, String PropertyRequestID, Int32 Timeout) [SAP BI Source [61]] Error: Microsoft.SqlServer.Dts.SapBw.Connectivity.ERPException: FAILED Execution failed.    at Microsoft.SqlServer.Dts.SapBw.Components.OHSExtractor.ExtractNow(Boolean InRuntimeMode, String GatewayHost, String GatewayService, String ProgramID, String ProcessChain, String DestinationName, String ExecutionMode, String PropertyRequestID, Int32 Timeout)    at Mic

How to troubleshoot apparently contradictory states in a WCF proxy's State property

I am terribly confused here and the information on the subject that I have been able to find online doesn't seem to quite solve this problem.  I have created a WCF Service; it is small and only has about a dozen operation contracts.  Then I created the client proxy; also quite small.  But I am having issues connecting the clients to the host.  Here is what appears to be happening: Public Sub Start() Try SyncLock syncObj Dim context As New InstanceContext(Me) m_proxy = New AwarenessSR.AwarenessWCFServiceClient(context, "NetTcpBinding_IAwarenessWCFService", m_endpointAddress) AddHandler m_proxy.InnerDuplexChannel.Faulted, AddressOf InnerDuplexHandler AddHandler m_proxy.InnerDuplexChannel.Closed, AddressOf InnerDuplexHandler Dim check As Boolean = False For i As Integer = 0 To 10 check = ValidateConnection() If check Then Exit For End If Next End SyncLock Catch ex As Exception ' Some error handling that I won't bother to copy End Try End Sub Public Function ValidateConnection(Optional ByVal autoRepair As Boolean = True) As Boolean Dim bIsValid As Boolean bIsValid = False SyncLock syncObj If autoRepair = True Then If m_proxy.State = ServiceModel.CommunicationState.Closed Or _

Unit testing is locking up WCF service?

I am trying to write some unit tests (more integration tests actually) to hit a live IIS server hosting my WCF service.  Whenever I run a test though, if one of my Assert statements fails on the client side, my WCF service seems to lock up- and I have to do an iisreset to get things back online. For example, I have in a test method 3 calls from my service client to WCF service- Call1, Call2 and Call3.  The first time through, Call1 works great, Call2 works great and then Call3 fires the Assert because some data is not correct.  On the next time through the test, Call1 fails with the following error:   "An exception of type 'System.ServiceModel.CommunicationException' occurred in mscorlib.dll but was not handled in user code Additional information: An error occurred while receiving the HTTP response to http://localhost/Kiosk/KioskSite.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details."   After doing an iisreset everything is okay again. Anyone have any ideas what might be going on?

Locking Page with progress message on postback

I have implemented a lockscreen based on the following articlehttp://www.4guysfromrolla.com/articles/121708-1.aspxIt does work for the most part but there are a couple of scenarios it causes issues and we ended up having to disable it.  Here is one example where it has issues.With a button on a page clicking the button calls the javascript to "lock" the screen with an overlay and show the progress message.In the button click I have the following code Response.ClearContent() Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment;filename=TestFile.pdf") Response.WriteFile(Server.MapPath("TestFile.pdf")) Response.Write(Date.Now.ToLongDateString() & " " & Date.Now.ToLongTimeString()) Response.End() which will display the file download dialog box which is what I want.  What happens though is that my lock screen stays on in this scenario because with my button click code I'm overriding the response.  Is there an easy way around this?  The only way I have figured out is have my button click write out some javascript to open a new window that calls a .aspx page which has the button click code shown above in it to write out the file or have an invisible iframe on the page and load the .aspx with the button click code shown above.  Any other way ar

SQLBROWSER runs, but 'netstat -ano' doesnt show UDP 1434 (how to troubleshoot)

i have been running sqlexpress2005 sp3 successfully (installed as a named instance) to a stand alone computer. i just noticed today that when i run...   netstat -ano | findstr 1434 nothing is listed!!!  if i go to services.msc and stop and restart sqlbrowser, it says its able to be controlled, and stopped, and started. i would like to know how to troubleshoot this... is there a way to know for sure if sqlbrowser is actually binding to UPD port 1434? or is there some problem on my system that prevents this port from showing up in netstat.  here is what netstat -ano reveals... C:\Program Files\Support Tools>netstat -ano Active Connections   Proto  Local Address          Foreign Address        State           PID  TCP                LISTENING       1208  TCP                LISTENING       4  TCP

Troubleshoot sitemanager.aspx problem

On the Site Content and Structure page for my site collection (sitemanager.aspx), there is one site that results in "There was an error in the callback" when trying to expand the plus sign in fron of it in the left tree.  If I just click on the site name, it errors out with the following:   Error   Cannot complete this action. Please try again.   at Microsoft.SharePoint.Library.SPRequestInternalClass.GetListItemWorkflowsAsSafeArray(String bstrUrl, String bstrListName, Int32 lItemI, Guid& pWorkflowInstanceId, Guid& pGuidTemplateId, Int32 inclusiveFilterState, Int32 exclusiveFilterState, UInt32& pdwColCount, UInt32& pdwRowCount, Object& pvarDataSet)    at Microsoft.SharePoint.Library.SPRequest.GetListItemWorkflowsAsSafeArray(String bstrUrl, String bstrListName, Int32 lItemI, Guid& pWorkflowInstanceId, Guid& pGuidTemplateId, Int32 inclusiveFilterState, Int32 exclusiveFilterState, UInt32& pdwColCount, UInt32& pdwRowCount, Object& pvarDataSet)    Has anyone ever encountered this error?  There's no workflow in this site.

Cross server Selects by application are locking the Server

.Net Application runs cross server queries and show up on the SSMS Monitor as Locks.  The seem to be select statements, and when the application is restarted, the locks are released. What can be locking the system and how do we go about troubleshooting it? The application runs queries across sql2k8 and sql2k5. Compatiblity level on 2008 is set to 2008 (80).  Here are the details from the Activity Monitor. SessionID:51 login:Application  Wait time(ms): 183414  Wiat type :LCK_M_S Blocked By : 102  HostName: VHP-SQL01  Task State : Suspended Command: Select  application: MSSQL  Wait Time    Wait Resource  KEylock hotid =  dbid = 16 lockb2f64580 mode X associatedObjectID= 

SQL Server 2005 Locking


We have a SQL Server 2005 stored procedure that updates the "batch_status" field of a specific row. This procedure is the one that is most frequently called in our entire system. It is typically called from within some third party software that moves information from queue to queue to queue. The last thing the software does is to update the status.

One of our custom applications shells out to this third party software, gets the process handle, and waits for the handle to close. Then, it finds out what the batch_status is to deterrmine what to do next.

As volume increases in our system it becomes more and more likely for us to get a dirty read and the affected data gets "stuck" rather than moved on to where it should go. I am extremely puzzled as to how the stored procedure is supposedly done, yet the change is not visible.

I don't know how to prevent these dirty reads. Should I use some locking hint in the update statement? If so, should I use it within a transaction block? I am very concerned about the effect either of these would be on overall performance. If I could get just a rowlock that would be great. I'm concerned that page locks and tablelocks will create a "gridlock".

Any ideas?

SQL Server 2008 Management Studio locking up while not running anything



Restart Server that DB is running on

Restart workstation that SQL Server 2008 Management Studio is running on

Start SQL Server 2008 and open file I'm editing

Edit the SQL file while while monitoring memory and processor usage on the workstation

Processor starts to spike, intellisense stops working, memory usage begins to climb to an absurd amount ~7G, management studio becomes almost nonresponsive (i.e. I can type and the text takes 30 seconds to 5 minutes to show up)

After about 30 mintues, memory usage drops to around 1.5G and management studio becomes semi-usable again.  Intellisense sometimes goes back to working, sometimes everything has to be restarted again.

I've been working on this exact setup for 7 months now and this problem is new.  No, I am not executing any statements - I am editing text only.

Help needed interpreting locking



I captured join between lock tables and waiting tasks and output is below. Is it possible to figure out from this output what is curlpit of this behavior?




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