A large user operation against Microsoft Visual Studio 2005 Team Foundation Server may cause the Microsoft SQL Server 2005 Database Engine to escalate to a table lock. Typically, this behavior occurs during large source code control operations.
For example, a large source-code control operation involves checking in approximately 5,000 files. As soon as an operation acquires 5,000 individual locks, the Database Engine automatically escalates the locks to a table lock. This table lock blocks all access to the table. This blocked access includes unrelated table access. For example, simple read operations and simple get operations cannot access the table.
This article describes how to configure SQL Server 2005 to avoid automatic escalation to table locks after an operation acquires 5,000 individual locks.
If you experience the issue that is described in the "Introduction" section, you can configure SQL Server not to escalate individual locks into a table lock.
To do this, follow these steps. Note
You may experience an out-of-lock memory exception when you disable lock escalation for large operations on a 32-bit computer.
- Disable lock escalation. To do this, follow these steps
- Click Start, click Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Configuration Manager.
- Click SQL Server 2005 Services, right-click SQL Server (InstanceName), and then click Properties.
- Click the Advanced tab, and then add the following line of code to the end of the Startup Parameters string:
- Click OK to close the SQL Server (InstanceName) Properties dialog box.
- Click SQL Server 2005 Services, right-click SQL Server (InstanceName), and then click Restart.
- Disable row locking on the tbl_PendingChange table and the tbl_LocalVersion table. To do this, follow these steps:
- Click Start, click Programs, point to Microsoft SQL Server 2005, and then click SQL Server Management Studio.
- Expand Database, right-click TfsVersionControl, and then click New Query.
- Add the following code example to the new query windows.
EXEC sp_indexoption N'tbl_LocalVersion.PK_tbl_LocalVersion',
EXEC sp_indexoption N'tbl_LocalVersion.IX_tbl_LocalVersion_WorkspaceId_LocalItem',
EXEC sp_indexoption N'tbl_PendingChange.PK_tbl_PendingChange',
EXEC sp_indexoption N'tbl_PendingChange.IX_tbl_PendingChange_TargetServerItem',
EXEC sp_indexoption N'tbl_PendingChange.IX_tbl_PendingChange_ItemId_WorkspaceId',
- Click Execute.
Article ID: 934005 - Last Review: April 30, 2007 - Revision: 1.1
- Microsoft Visual Studio 2005 Team Foundation Server
|kbcode kbinfo kbhowto KB934005|
Contact us for more help
Connect with Answer Desk for expert help.