Tagged Questions
1
vote
1answer
38 views
How can I make a select statement get blocked?
Hello I am trying to intentionally make a SQL select statement get blocked by another simple SQL delete or update statement, for the purpose of learning. I prefer only InnoDB tables.
To prepare the ...
0
votes
1answer
37 views
Pessimistic locking worst case
We are using Java EE. And are making an apllication where in the worst case, aloot of message queue messages willl come form the same User.
Therefore we are looking on Pessimistic, SELECT FOR UPDATE ...
3
votes
1answer
276 views
How to force the use of row locks?
I am trying to get my table to use row locks. I have already disabled lock escalation. The isolation level is READ_COMMITTED_SNAPSHOT
alter table <TABLE_NAME> SET (LOCK_ESCALATION=DISABLE)
go
...
2
votes
2answers
637 views
Deadlock on insert for a table with an insert trigger that updates column in same triggered table
By specification each table uses a guid as the primary key. Another requirement is that each resource requires a 6 number identifier (100001, 100002, ...) as a public id that is unique within the ...
0
votes
1answer
359 views
SQL Server 2008, database completely locked
Our database becomes completely locked, and it seems that many tables not related to each other are locked at once. When this happens, it becomes locked for approximately 2 minutes, and when this ...
3
votes
1answer
171 views
All-or-none exclusive lock on 2 SQL tables
My simplistic testing suggested that I can acquire an exclusive lock on 2 tables or postpone acquiring the lock on either until both can be acquired at once by using a query like this:
SELECT ...
2
votes
2answers
252 views
Alternatives to sp_indexoption for Row Locks and Page Locks in SQL Server 2008
Are there better alternatives to setting the Row Locks and Page Locks in SQL Server 2008?
The case here is to set the row and page locks to false on the table. The lock is in effect during a series ...
7
votes
2answers
310 views
How does SQL Server determine the order it takes locks in while selecting a table?
I have two stored procedures that are deadlocking when the system is under load. Proc A is selecting from a table while the Proc B is inserting into the same table. The Lock Graph is showing that Proc ...
3
votes
1answer
1k views
How to find out what caused the database(DB2) in a locking state
I know how to check the DB is in a lock state or not, but my question is how to find out which query caused the lock on table /db.
IS there any log file getting created if something unexpected ...
2
votes
1answer
356 views
Locking, deadlocking workaround while process data at the same table
My database has a table: tableX.
Task1 makes intensive INSERTs (1000 records per minute) as records to process and very seldom UPDATEs (1-2 records per minute) as records to recalculate.
At the ...