Questions tagged [table-lock]
42 questions
10
votes
1 answer
Rails running multiple delayed_job - lock tables
Hey. I use delayed_job for background processing. I have 8 CPU server, MySQL and I start 7 delayed_job processes
RAILS_ENV=production script/delayed_job -n 7 start
Q1:
I'm wondering is it possible that 2 or more delayed_job processes start…

xpepermint
- 35,055
- 30
- 109
- 163
5
votes
1 answer
TABLOCKX not working
I am playing with my SQL Server 2012 trying to get a hold of the locks. Based on a tutorial I saw, I tried to test obtaining an exclusive lock on a table so that no other query would be able to read information from it, until the transaction is not…

user2557930
- 319
- 2
- 11
4
votes
2 answers
myisam place table-lock on table even when dealing with 'select' query?
i am reading the book High Performance MySQL, it mentions:
performing one query per table uses table locks more efficiently: the queries
will lock the tables invididually and relatively briefly, instead of locking
them all for a longer…

James.Xu
- 8,249
- 5
- 25
- 36
4
votes
1 answer
Table lock throws exception vs table lock waits for end
Currently i am wondering, why some times ADO.NET throws directly a table lock exception, when a table is locked and some times the executed statements waits, until the table is not locked any more. When does a table lock cause an exception and when…

BendEg
- 20,098
- 17
- 57
- 131
3
votes
2 answers
Mysql - Table lock error
I am experiencing some problems with table locking. I have locked certain number of table in transaction. LOCK TABLES t1 READ, t2 READ, t3 READ, t4 READ,t5 READ,t6 READ,t7 READ;
While reading its ok, but when I am trying to write/update to this…

Duke
- 35,420
- 13
- 53
- 70
2
votes
2 answers
MySQL Alternative to "Lock Table" in Stored Procedure
I have a requirement to insert a row into a table if a row does not already exist, and I need to do this using a stored procedure. I therefore need to select to check if the row already exists, followed by an insert. What I want to avoid is a race…

Tim Lloyd
- 37,954
- 10
- 100
- 130
2
votes
1 answer
How to initiate tables lock for stored procedure in Azure Synapse Analytics?
Currently, I encountered an issue on Azure Synapse Analytics. I have a parent_cust_industry table which is full refresh - The table loads using stored procedure as below:
CREATE PROCEDURE [test].[test_proc] AS
BEGIN
-- LOAD TYPE:…

Ken Masters
- 239
- 2
- 17
2
votes
1 answer
(MySQL 5.7.19 AWS RDS) how to change table column character set without locking
i want to change table character set from 'utf8' to 'utf8mb4'
but each column has own character set setting(utf8)
so i need to change column character set to 'Table Default', but locking is the problem
help me to change column character set without…

user5013462
- 33
- 3
2
votes
1 answer
Oracle Index - full table scan/lock
Found this here:
In general, consider creating an index on a column in any of the following situations:
A referential integrity constraint exists on the indexed column or
columns. The index is a means to avoid a full table lock that would
otherwise…

Robotronx
- 1,728
- 2
- 21
- 43
1
vote
0 answers
How to freeze table header at modal box
So I have tried using these TableLock method on normal page, it works just fine, but I tried using it on modal box and it didn't work. Any idea how to make table header at modal box freezes after it touched the top part of browser? I don't want the…

wendy
- 161
- 3
- 14
1
vote
1 answer
Catch table lock exception for sql anywhere ado.net
What is the best way, to catch a table lock exception with ado.net and iAnywhere.Data.SqlAnywhere.EF6? My problem is, that command.ExecuteNonQuery cause a SAException which contains the message, that a user has locked all rows in a table.
The…

BendEg
- 20,098
- 17
- 57
- 131
1
vote
2 answers
Prevent parallel execution using a table lock (MySQL)
I have a MySQL table called cronjobs which holds entires for every cronjob needed (e.g. delete old emails, update profile age, and so on). For every cronjob there is a defined code block which gets executed if the cronjob is due (I got different…

Freddy
- 349
- 1
- 2
- 12
1
vote
0 answers
Possible solution for locking the table in sqlserver using asp.net
I have been working on a software which uses database which is shared with multiple PCs. The project is all about to store missing baggage information. We have given a facility to copy the newly inserted record into the master DB.
Now what here…

The Hungry Dictator
- 3,444
- 5
- 37
- 53
1
vote
1 answer
Lock happens when I execute stored procedure inside trigger
I have a trigger for executing two procedures.
ALTER TRIGGER [dbo].[TRG_SP_SYNCH_CAB]
ON [VTBO_INTERFACE].[dbo].[T_TRIGGER_TABLE_FOR_SYNCH]
INSTEAD OF INSERT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
--…

Hakan Kara
- 433
- 1
- 6
- 16
1
vote
3 answers
Error in importing mysql database
I took dump of a DB from the production. I want to import into my local database
mysql -u user_name -p db < db.sql
But it shows some error
ERROR 1005 (HY000) at line 25: Can't create table 'table_account' (errno:13)
And I am unable to import the…

Akhil
- 967
- 1
- 7
- 14