A mechanism for committing a consistent set of changes into a database atomically.

learn more… | top users | synonyms

6
votes
1answer
184 views

Transactional DDL workflow for MySQL

I was a little surprised to discover that DDL statements (alter table, create index etc) implicitly commit the current transaction in MySQL. Coming from MS SQL Server, the ability to do database ...
1
vote
1answer
40 views

Write-lock a whole table during transaction

I need to perform a delicate operation to my table in which I will solely insert, delete and select upon all of my rows and no God may interfere with the table during this operation: the table will be ...
1
vote
1answer
89 views

Print, transaction and cursor performance in Transact-sql

I'm having some performance issues when I run a script. I was reading about the problem with print and its performance, but I cannot figure out how to reduce the impact. The algorithm is O(n^2). The ...
1
vote
1answer
49 views

Transaction Rollback

I have a purging process that runs to delete old data from table to avoid table growth. My delete statement would be a simple delete based on join something like below Delete FROM TABLE_A A JOIN ...
0
votes
1answer
48 views

Oracle dataguard - Redo apply

In a low bandwidth environment when a transaction commits that generates a large amount of redo data will cause other independent transactions to slow down. This is because the redo data of small ...
0
votes
1answer
385 views

MySQL: Transaction and Deadlock

I have table "tbl_data", where have a lot of rows (3 - 5 million). I have JAVA (*.jar) module from which I INSERT/UPDATE data into this table. If I start *.jar file (for example, "run.jar") and after ...
-1
votes
1answer
60 views

shrink transaction log

Can I shrink transaction log when database in online using below command ? DBCC SHRINKFILE(transactionloglogicalfilename, TRUNCATEONLY) FYI my database is in production server & highly critical ...
5
votes
0answers
79 views

How to terminate a suspended SQL Server transaction waiting for IO_COMPLETION?

We have a transaction that has been running for more than 5 hours. We are running out of disk space. The session has been killed but it is still waiting for IO_COMPLETION. Actually the wait_type just ...
4
votes
0answers
71 views

When does SQL Server acquire locks?

The list of isolation levels in SQL Server found here states that write locks acquired within a transaction are retained until the end of the transaction. However it doesn't mention anything about ...
2
votes
0answers
36 views

Trigger/Event that fires when a Transaction finishes

I have a query that pulls from about 15 different tables. I am looking to materialize this into a table that stores it in xml/json. (To improve performance.) The problem I have is that these tables ...
2
votes
0answers
426 views

Postgresql trigger - get all changed rows after transaction

I have invoice_item table and invoice table. I need to check total price of Order after each transaction. Since I still want to be able to change things, I need trigger after each transaction. CREATE ...
2
votes
0answers
117 views

Why does MySQL force the tradeoff between swallowing errors and leaking commits in transactions?

Referring specifically to the choice of whether to use DECLARE EXIT HANDLER FOR SQLEXCEPTION. If you use it, you swallow errors and there doesn't seem to be any way to access them programmatically, ...
1
vote
0answers
17 views

SQL Server Log Shipping Randomly Stops Copying and Restoring

I'm fairly new to Log Shipping but have configured a few with no issues, however I have a server sitting on SQL 2008 R2 with 6 databases on there, all 6 of these are supposed to be log shipping. The ...
1
vote
0answers
38 views

Why are SELECT queries in sleeping status holding open transactions

Using sp_WhoIsActive, I see that I have a lot of processes in a "sleeping" status, several for hours. I am not sure of the cause and am still troubleshooting (timeout? bad code with uncommitted ...
1
vote
0answers
95 views

How to find the number of transactions per day or per hour in a SQL 2000 database

I am trying to find a query that I can run in order to find the number of transactions per day or per hour in a SQL 2000 database. The purpose is to get the number of hits on the database. I have ...
1
vote
0answers
52 views

SQLite insertion with junction table

I need to write a transaction for SQLite, that adds a blog post and links it to content tags, and it seems to be a bit too complicated for me. Here's an example schema: CREATE TABLE blogpost( ...
1
vote
0answers
38 views

What is the difference between 2 phase locking and strict 2 phase locking?

2 phase locking is used to ensure isolation of database transactions (by ensuring serializability). But there is another term called Strict 2 phase locking. I find it hard to understand the ...
1
vote
0answers
64 views

Make the SQL Database manage CRUD operations

Is it possible to have a client app send a transaction of INSERTs to a table. Then have the table triggered somehow to run through the inserts and either INSERT the row or UPDATE an existing row? If ...
1
vote
0answers
22 views

MySQL - Transactions and causality

I'm new to MySQL's LOCK and TRANSACTION and have a question about different isolation levels of a transaction: Given two transactions executing the same code (auto-commit is false): (1) get data of ...
1
vote
0answers
111 views

firebird update very slow

I am writing a stored procedure for Firebird 2.5 in which I sometimes need to update a single row in a data table more than once in the same transaction. However, I have noticed that the performance ...
1
vote
0answers
84 views

Transactions using Isolation Level on databases with FileStream

We have a highly transactional application. We have a requirment to upload huge data into our database that can happen for a duration of 5-10 minutes. During our upload time, the tables are getting ...
1
vote
0answers
92 views

Is there a way to detect if there is an uncommitted transaction in H2?

I am using an H2 database with JDBC to create a connection with setAutoCommit(false). I am currently programatically checking whether or not there is an uncommitted transaction, but I was wondering ...
1
vote
0answers
116 views

migrations within transactions

I have a bash script to run migrations on our MySQL databases. Is it possible to wrap migrations within a single transaction when running multiple migration scripts from the command line? ...
0
votes
0answers
91 views

MySQL Transaction with rollback upon @@error

I have done several transactions with MySQL but mainly using php's libraries as the handle. Using php you would have something as: $pdo->beginTransaction(); $pdo->execute(' query1; ...
0
votes
0answers
15 views

Transaction block on coordinator

I tried to commad a procedure described here: http://files.postgres-xl.org/documentation/add-node-datanode.html We went as far as the third step, and everything was going perfect, but during the ...
0
votes
0answers
27 views

How to reset @@IDENTITY value inside a Sybase SP

Is there any way to reset the @@IDENTITY value inside a Sybase SP? I'm writing a SP which involves a transaction, so everytime I do an insert, to check data was correctly inserted, I assign ...
0
votes
0answers
53 views

Why are transactions long running?

My stored procedure has a transaction blog. I pick up a record from a database and process it in that transaction block. I noticed that my transaction log has grown in gigabytes. But my transaction ...
0
votes
0answers
43 views

What happens when a mysql connection gets lost?

I hope this is a question for the dba board. Otherwise blame me and i'll switch to unix. imagine the following situation: you have a Mysql server S and two clients A and B. Both clients connect to S ...
0
votes
0answers
74 views

How can I perform reads and writes in the same transaction?

I'm trying to implement transactions in my application. I'm just trying to implement it like the example shown in the BeginTransaction() documentation. Public Shared Sub Process(wwid As String, ...
0
votes
0answers
14 views

Should I use mysql transaction in SaaS application

Can any one elaborate whether we should use transaction for SaaS based application having simple modules like note taking and task for a team? Also if I make a Quickbook like SaaS app then do I have ...
0
votes
0answers
56 views

SSIS Transaction Set to Required giving error

I want to use transactions in SSIS insert update. My package is working fine but When i set transaction option to "Required" i am getting an error like [OLE DB Source [23]] Error: SSIS Error Code ...
0
votes
0answers
23 views

MySQL Cluster TransactionInactiveTimeout and “operations”

Description: http://dev.mysql.com/doc/refman/5.6/en/mysql-cluster-ndbd-definition.html#ndbparam-ndbd-transactioninactivetimeout I have couple of questions about this parameter. First of all, what ...
0
votes
0answers
204 views

MYSQL: InnoDB inserts wont rollback transaction inside a stored procedure

I have this stored procedure: START TRANSACTION; code_gen_loop: WHILE @Codes > 0 DO IF MOD( @Codes, 10000 ) = 0 THEN EXECUTE qry_status_stmt2; EXECUTE qry_status_stmt3; ...
0
votes
0answers
46 views

MySQL JDBC Driver puts transaction in read only. Why?

Using the MySQL JDBC connector with a MySQL 5.6.22 data source defaults the transaction mode to read only. Anyone know why?
0
votes
0answers
19 views

Percona XtraDB and innodb_flush_log_at_trx_commit=2

I'm running Percona XtraDB on a three nodes cluster. Each one has this piece of configuration: innodb_flush_log_at_trx_commit=2 sync_binlog=0 I perfectly know that this is not the safest ...
0
votes
0answers
498 views

Many transactions are getting stuck in the “cleaning up” state - what could cause that?

I'm trying to track down a locking issue, and found via SHOW PROCESSLIST that when the queries in question are waiting for locks and timing out, there are no other queries active in the process list. ...
0
votes
0answers
70 views

How can I lock an INSERT operation

OK, I know the title is confusing, let me rephrase with a description of the problem. The environment is SQL Server 2012. I have a table with Customers Id 1 And a table with their transactions ...
0
votes
0answers
202 views

When is transaction removed from sys.dm_tran_active_transactions?

We are having some issues with clients getting Transaction Timeout when connecting to our clustered SQL Server 2008 R2. To investigate the problems I have been digging into ...
0
votes
0answers
61 views

Why does the delete/update block each other in this case?

The following drives me crazy. I have: session1>begin; session2>begin; session2>update dummy set salary=1000 where id=11; session1>delete from dummy where id=1; id is the PK ...
0
votes
0answers
53 views

About transactions on mongodb

To what extent the atomic storage of mongodb can leave your database unsafe of inserts or updates on my data? In the other words. What are the possibilities of my data not been (inserted or updated) ...
0
votes
0answers
1k views

Oracle Transaction recovery: lock conflict caught and ignored

In alert log there are a lot of "Transaction recovery: lock conflict caught and ignored" statements. I've found some information, that this error is caused when there is an active dead transaction. ...
0
votes
0answers
154 views

What are the possible reasons for SQL Server errors on reading operations upon switching ALLOW_SNAPSHOT_ISOLATION` and `READ_COMMITTED_SNAPSHOT ON?

I have a client-server app running in Windows Server 2008R2 using/interacting SQL Server 2012. After reading app's documentation as well as feedbacks on internet from those who already accomplished ...
0
votes
0answers
74 views

MySQL server vs client isolation levels

What is the difference between setting the transaction isolation level in the client configuration and the server configuration? If I set the client isolation level to be serializable while the ...
0
votes
0answers
53 views

Federate engine to help overcome distributed transaction?

Currently we have been using pure innodb. The issue is that we have architecture where we have multiple outlet each have its own local db and a copy of it in the hq outlet. The issue is that we ...
0
votes
0answers
49 views

Examples of a database with no consistency measures that ensures consistency through schema alone

To clarify, the database can be any type RDBMS, NoSQL/BigTable. However, it must not employ any usual consistency measures such as locks, or synchronization, but the inconsistency-invincibility must ...
0
votes
0answers
118 views

What would this non-'unique index with a unique search condition` query lock?

I am not sure about this part of the transaction manual For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE), UPDATE, and DELETE statements, locking depends on whether the statement ...
0
votes
0answers
106 views

Being careful about additional records being added in a duplicate record merge?

We have a multi-user MS-Access 2003 database. Connecting to it using SQuirrel SQL, and the JDBC/ODBC bridge, I've managed to eek transactions of some sort out of JET by turning off autocommit. I've ...