Questions tagged [database-locking]
129 questions
1
vote
1 answer
MS Access Prevent Database Locking
When I query my MS Access database, I notice that it's locked and other applications cannot access it. Here is my code:
public void PopulateDataTableSettings()
{
if (_dt.Rows.Count == 0)
{
string query = "select *…

Joseph Anderson
- 4,114
- 4
- 45
- 99
1
vote
1 answer
Oracle locks index on multiple inserts
I have this problem, and has not found a solution for it yet:
I have a application with multiple tables (like most applications).
Two of the tables are:
TB_POLICY
---------
id number(18) : PK
... some other columns
TB_REDEMPTION
-------------
id…

Amir Pashazadeh
- 7,170
- 3
- 39
- 69
1
vote
3 answers
Could an query with READ UNCOMMITTED isolation level cause locks on the tables it access?
My app needs to batch process 10M rows, the result of a complex SQL query that join tables.
I'll plan to be iterating a resultset, reading a hundred per iteration.
To run this on a busy OLTP production DB and avoid locks, I figured I'll query with a…

Gili Nachum
- 5,288
- 4
- 31
- 33
1
vote
1 answer
Producer - Consumer and database queue
I have a producer consumer mechanism, I am forced to store produced items in database, this is a requirement. Also I have several producers and several consumers, producers and consumer threads will access records in several database tables;…

Costa
- 3,897
- 13
- 48
- 81
1
vote
3 answers
Why using Locking in MongoDB?
MoongoDB is from the NoSql era, and Lock is something related to RDBMS? from Wikipedia:
Optimistic concurrency control (OCC) is a concurrency control method for relational database management systems...
So why do i find in PyMongo is_locked , and…

Abdelouahab Pp
- 4,252
- 11
- 42
- 65
1
vote
2 answers
"database locked" error on one machine but everything fine on the other
Using SQLite on Java with JDBC connector, I constantly get this "database locked" error on my code. The strange thing is that the jar file into which I have compressed my whole program works fine on my Macbook but gets this error when running on a…

Roozbehan
- 478
- 5
- 15
0
votes
0 answers
Accomplish Database Locking in Magento
I need to ensure that a record's value is locked while being read (to verify if a certain number of credits are available), and then I need to update that record (while still locked) to deduct the number of credits available. Is there a best way (or…

Steven
- 3,526
- 3
- 18
- 28
0
votes
1 answer
SQlite3 locking windows
I am noticing locking (OperationalError) when using the SQLite 3.7 for python application . I am using SQLalchemy for ORM.This issue occurs on windows. I using the DB on the same machine as the application.
It seems to be working fine on ubuntu.…

Ashish
- 851
- 12
- 27
0
votes
1 answer
Can I "LOCK IN SHARE MODE" without a transaction?
Do I need to start a transaction in order to create a lock in share mode lock?
Ie, either,
$dbc -> query("SELECT * FROM table WHERE id = 1 LIMIT 1 LOCK IN SHARE MODE");
Or,
$dbc -> beginTransaction();
$dbc -> query("SELECT * FROM table WHERE id = 1…

cgwebprojects
- 3,382
- 6
- 27
- 40
0
votes
0 answers
What could cause Postgresql to suddenly report waiting for MultiXactOffsetSLRU and MultiXactOffsetBuffer for almost all active queries?
Today we have encountered a performance problem with our postgresql 15 Cluster. All of a sudden today we have seen a massive performance drop starting to occur without any changes to the database servers, the client behaviour nor any software…

Niels Kristian
- 8,661
- 11
- 59
- 117
0
votes
0 answers
SQL Server READ_COMMITTED_SNAPSHOT Isolation Level - Shared Lock Issue
In microsoft documentation about transaction isolation level it states that;
If READ_COMMITTED_SNAPSHOT is set to OFF (the default on SQL Server), the Database Engine uses shared locks to prevent other transactions from modifying rows while the…

Dhanuka Jayasinghe
- 147
- 2
- 7
0
votes
0 answers
Select query hangs when a large number of rows have an update lock
I am designing a program that will read a queue table. I am using locking to make sure that multiple instances do not pull the same row.
I am locking rows like this:
BEGIN TRANSACTION
UPDATE top(10) Source with (ROWLOCK, READPAST, updlock)
…

Don Chambers
- 3,798
- 9
- 33
- 74
0
votes
0 answers
oracle DB not releasing lock in case of db connection issue caused by network error
We have an application in java that is distributed and deployed on more than 20 machines. So we use DB locks to handle concurrency at the application level.
The database used is oracle here and we are using dbms_lock package. First, we call…

stephen fernandes
- 103
- 1
- 13
0
votes
0 answers
MS Access backend table access locks entire backend file Office 365
Background:
We currently run a large set of MS Access databases (I know, they should be migrated, but the business won't spend the money) with a central fileserver location for backend files and front end files running on each users' computers; it…

Jaf
- 1
0
votes
0 answers
Unexpected postgres row lock
We are seeing the following problem on a postgres database, which runs two processes.
Process #1 examines a table for new records, by do a SELECT on the table. No transaction is in play at this point.
It then iterates through the records one record…

MHugh
- 455
- 1
- 7
- 20