Questions tagged [database-locking]

129 questions
2
votes
1 answer

Hibernate prevent locking of records when updating

I have a long process that run on every user in my database and updates the score and hits fields, while this is running, sometimes a user tries to update his name/phone etc. right now when this happens the user update fails…
Cony
  • 213
  • 1
  • 8
  • 21
2
votes
2 answers

Oracle dirty read

I'm new using Oracle database 11g. I was testing table and row locks using SQL Developer. I have a row in my table like this: id : 1 desc: 'abc' I did an update without commit to change the field desc to 'zxc'. In another session I did a select…
2
votes
1 answer

MySQL Specify innodb_lock_wait_timeout for a specific query

I'm using MySQL 5.6. I have a specific query in my application that I don't want to be subject to the global innodb_lock_wait_timeout setting. Is there any way that I can specify that this specific query should wait a different amount of time for a…
Sean
  • 1,110
  • 1
  • 14
  • 24
2
votes
0 answers

quartz scheduler db lock obtaining issue while on a 2 node cluster

We have implemented Quartz Scheduler 2.2.1 using Spring 4.0.5 . The application starts up fine in a single node , however whenever we try to deploy it to a 2 node cluster , it just hangs while trying to connect to the DB and then the server rolls…
2
votes
0 answers

Using Entity Framework for SQL Compact Edition 3.5 does not respect mode=exclusive property of connection string

I am using SQL Server Compact 3.5 edition with Entity Framework and I want to have exclusive lock on the database as documented here http://msdn.microsoft.com/en-us/library/ms171817.aspx. However when you pass this in a connection string to Entity…
AJ.
  • 41
  • 2
2
votes
2 answers

Delphi: Database is locked (SQLite)

I am facing two problems... (1) When I try to write to a Database (SQLite) by using Delphi XE6, I always get the Database is locked error message. I am certain that I close the database everytime I access it by using the command …
Alvin Lin
  • 199
  • 2
  • 5
  • 13
2
votes
1 answer

Strange error in Sqlite

In my problem case I am using a service to update a Database at a particular time every day, to increase the speed of insertions I have put the DB insertion operation inside a try-catch-finally block and used transactions, which I set successful in…
User3
  • 2,465
  • 8
  • 41
  • 84
1
vote
1 answer

nowait or another method in Django admin page

I'm using Django and trying to find something similar to nowait=True in Django admin page. I have some script which locks entries(select for update) during working. So, when I try to change some fields values in Django admin page for that entry when…
Goroshek
  • 81
  • 11
1
vote
4 answers

AzureSql/SQL Server - Concurrent transactions, rowlock, updlock and holdlock

I have a transaction where Transaction start I run an update on a row with a given id that is marked currently active and mark it inactive Add a new row with a audit_id from the above updated row Commit the transaction. However, when two…
Hemanth Gowda
  • 604
  • 4
  • 16
1
vote
1 answer

Oracle: Which is Lock is acquired by Serializable isolation level

What I am trying to establish is whether there is any direct relation between Isolation Levels and Locks. So, let's say I started a transaction with a Serializable isolation level then will Oracle by default acquire some type of "Table" lock on all…
hagrawal7777
  • 14,103
  • 5
  • 40
  • 70
1
vote
1 answer

"Waiting for table flush" Against Analyze Command

I was trying to run analyze command on a table out of 900 tables in mysql 5.7.30. Its stuck my all db process-list and connections spike immediate and lot of commands found with state "Waiting for table flush" even our max_connection parameter…
Irfi
  • 49
  • 2
  • 6
1
vote
0 answers

Creating sub-partitioned tables without locking the parent table

I am using Postgres 13. I have a table (accounts) with around 100 million records, that is (hash) partitioned in to 50 tables (based on the user_id) This is then further (range) partitioned into 14 tables each, based on the day of transaction. Every…
1
vote
1 answer

Why does a postgresql page SIReadLock get set for an update to a single row

I am selecting a dataset of records from table 'tablename' and then iterating through the dataset, updating one record at time (UPDATE tablename SET... WHERE id=x). Each update is done within a transaction block, and each one sets relation…
MHugh
  • 455
  • 1
  • 7
  • 20
1
vote
0 answers

Problem with database concurrency in a cluster

I have a Spring Boot API with Oracle Database running in a JBoss cluster. I'm trying to use @Lock(LockModeType.OPTIMISTIC_FORCE_INCREMENT) to lock a register at and don't make it to be updatable at the same time for different clients, and that works…
rafu
  • 35
  • 1
  • 3
1
vote
1 answer

Why the SQLite database file is locked using WAL Mode and Pooling enabled?

I am using a SQLite Database in my C# program. The program saves values every second in the DB, and also checks everytime if the tables already exist: class DataManager : IDataManager { private bool machineTableIsCreated = false; private…
Vini121
  • 41
  • 9
1 2
3
8 9