
database - In SQL Server, how can I lock a single row in a way …
In SQL Server there are locking hints but they do not span their statements like the Oracle example you provided. The way to do it in SQL Server is to set an isolation level on the transaction that contains the statements that you want to execute.
SQL Server: Plan Freezing & Plan Guides in SQL Server – Part I
Jun 7, 2011 · Plan Freezing is a concept where you can freeze a particular execution/query plan that already exists in the procedure cache. When you freeze a plan for a query, every time you run the same query (exactly the same query), SQL …
How to freeze the TSQL session while we executing ... - SQLServerCentral
Jul 23, 2012 · DBCC FREESESSIONCACHE - Flushes the distributed query connection cache used by distributed queries against an instance of Microsoft SQL Server.
Stabilizing Execution Plans: Plan Guides and NORECOMPUTE
Jul 10, 2014 · Option 1: Change the code. The very best option is changing the code so you don’t have to resort to shenanigans behind the scenes. You can rewrite the TSQL, change indexes, or use hints to get a specific plan. But sometimes this is …
Query Hints You Can Use to Avoid Blocking - Brent Ozar …
Jan 21, 2021 · SET LOCK_TIMEOUT 1000 – if you run this before your query starts, SQL Server will wait patiently for X milliseconds before giving up and aborting your own query.
If You Like Your Query Plan, You Can Keep Your Query Plan - SQL …
Nov 18, 2013 · How Do You Freeze a Plan? Using the sp_create_plan_guide_from_handle procedure. The books online article linked gives a good example. Rather than take you through the code here, I recommend that example to you.
Configure Frozen Plans | Configure SQL Performance Options ...
You can use the FREEZE PLANS and UNFREEZE PLANS commands to freeze and unfreeze query plans individually, by table, by schema, or by namespace. To freeze or unfreeze an individual plan, find the Hash for the desired Statement by querying INFORMATION_SCHEMA.STATEMENTS .
Freeze and Unfreeze Write IO on a Database – John Huang's Blog
Nov 28, 2011 · Do you know you can suspend the write IO on one of your database and resume them later? 2 undocumented DBCC command allow you to do so, DBCC Freeze_IO and DBCC Thaw_IO. When DBCC Freeze_IO is called all the IO performing writing operation will be suspended immediately (not terminated).
Transaction locking and row versioning guide - SQL Server
A single Transact-SQL statement acquires at least 5,000 locks on a single nonpartitioned table or index. A single Transact-SQL statement acquires at least 5,000 locks on a single partition of a partitioned table and the ALTER TABLE SET LOCK_ESCALATION option is set to AUTO.
FREEZE Statement (MDX) - SQL Server | Microsoft Learn
Jan 31, 2024 · The FREEZE statement locks the values of cells in a specified subcube, preventing subsequent statements in an MDX script from changing their values in subsequent calculation passes. In the following example, A and B represent subcubes in …