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

learn more… | top users | synonyms

1
vote
1answer
62 views

Can sequential queries result in concurrent transactions?

I'm using PostgreSQL 9.4.4 and the default configuration. I use a JDBC connection to run multiple queries in succession. Only one Java thread is using the connection and before a new query is executed ...
0
votes
0answers
45 views

Creating a database to analyze transaction data for sports events

I would like to create a database to analyze transaction data for sports events. There is already a transactional database from which I can get raw data into excel. I want to transform this raw data ...
1
vote
0answers
36 views

2 phase locking with added increment mode

I have this assignment question where increment mode is added in addition to read and write lock modes in two phase locking.But I cant seem to figure out whether each lock mode has its own seperate ...
0
votes
2answers
82 views

Elements inside a container: How to perform atomic operations on them?

In my DB (Postgres 9.4) I have the following items: Tshirts, Jeans, Shoes and Boxes. Tshirts, Jeans, Shoes can be placed inside a box and they can have a color (the color may be null). Each element ...
1
vote
0answers
23 views

Logging within a procedure's transaction

I have an ETL process running inside a PostgreSQL 9.3 procedure on AWS RDS. The procedure normally takes about ten minutes to run, but I'm having a rare issue where it takes several hours and never ...
3
votes
2answers
53 views

innodb_flush_log_at_trx_commit=1 and flush-to-disk reality

I use the default settings of MySQL 5.5 on various servers and I have the following table: create table test._perf ( name varchar(255) not null ) engine=InnoDB; I have an .sql script which ...
6
votes
2answers
270 views

Where does InnoDB store transaction data before committing it?

I've done some tests using READ_COMMITTED and READ_UNCOMMITTED at home, using the JDBC technology. I see that READ_UNCOMMITTED can actually read uncommitted data, e.g. data from some transaction not ...
1
vote
1answer
76 views

how to find the name of the distributor server and publisher server from the subscriber server/subscriber database

Having in mind that I can add computed columns to the subscription tables according to this link: SQL Server : Transactional Replication Computed Column That I am already doing, and also adding ...
2
votes
1answer
107 views

SQL Server 2008 R2 Transaction Counts

Good Afternoon, We have a pretty big SQL Box 32proc 128gb. We had a change in our environment, not sure what exactly change, db/code. We're investigating that aspect as well. One of the things ...
2
votes
2answers
138 views

Is there any reason not to use foreign keys in MySQL?

I've never really used foreign keys before but I am building a project where they could come in handy. I have looked at some other large software such as some forum systems and they don't use foreign ...
1
vote
1answer
20 views

Do queries called from within a transaction but found within another method act the same?

Imagine the following code: class foo { public function bar() { // Start the transaction $transaction = $this->db->beginTransaction(); try { ...
4
votes
1answer
119 views

transaction across multiple databases - what is the overhead?

I run the following update, which is one single transaction across 2 databases. Please note I have not committed the transaction. --================================================================ ...
1
vote
2answers
86 views

run job with uncommitted transaction - how to find the transaction? is it still active?

By mistake I have run the job I just put into production, but the COMMIT TRANSACTION was commented out. when I look at the job log, it printed that it did my updates with no problem. when I run ...
5
votes
1answer
55 views

About backing up Transaction logs

I have understood the importance of transaction logs but still unclear on a few things: I've taken back-up of a T-log using this statement: BACKUP LOG myDB TO DISK = 'I:\Log_Backup\myDB.TRN' GO ...
9
votes
1answer
1k views

“truncate log on checkpoint” option in SQL Server

Long story but our long term consultants (former employees) wrote a custom script years back (2006 or so) to interface with Tivoli Storage Manager and it appears to be checking for a SQL Server DB ...
0
votes
1answer
97 views

Inserting unrelated data while a transaction is occuring

I'm thinking about implementing transactions to my app to help with consistency issues. I'm using MySQL. I'm wondering what might happen if while inserting several rows as a transaction, the server ...
2
votes
1answer
273 views

What is mean by a blind write in a schedule?

I know that every conflict serialisable schedules are view serialisable but the converse is not true. I read in a webpage that when a schedule is view serialisable but not conflict serializable then ...
2
votes
1answer
59 views

Large rolling update on huge table: Getting slower and slower

SQL Server 2014 Standard Edition We have a table with 100million+ rows. We need to update values in a couple of columns. We did the below, and it has been running for 18 hours now, and has only ...
9
votes
1answer
1k views

Are explicit transactions needed in this while loop?

SQL Server 2014: We have a very large (100million row) table, and we need to update a couple of fields on it. For log shipping, etc, we also, obviously, want to keep it to bite-size transactions. ...
1
vote
1answer
463 views

How to calculate MySQL Transactions per second

How can I calculate MySQL Transactions per second. I tried to use formula (global com_commit+global com_rollback)/uptime since flush. I had also tried (global insert+ global delete+ global ...
2
votes
2answers
300 views

Do Nested Transactions commit? [closed]

I am not happy with the Wikipedia article about nested transactions. I would not use the word "commit" for a nested transaction. For me "commit" means "durability". A nested transaction does not ...
2
votes
1answer
44 views

How to create test environment for lost transactions

I have a problem that I hope you can help me to solve. I'm using SQL Server 2008 R2. I need to create a test environment in which I'll be able to artificially 'create' lost transactions. Due to ...
3
votes
1answer
171 views

Is REPEATABLE READ the right choice for validation before modifying data?

In my database I have a Task table. This table has a number of fields that are foreign keys to other tables. There are also a few link tables, that have Task on one end. When a new task is created ...
8
votes
1answer
251 views

Is there a performance difference in committing and rolling back a read-only transaction?

I open a (repeatable read) transaction (BEGIN TRAN) to do some work on certain records. First thing I do is checking if the data I need to change is in the database. In some cases there will be and ...
1
vote
1answer
52 views

SQLAnywhere: Savepoint for ROLLBACK not found

What is the correct way on setting and rolling back to savepoint on SQLAnywhere. Having this snippet: begin transaction; SAVEPOINT spt_abc; insert into eins (pl1) values (5); SAVEPOINT spt_123; ...
1
vote
1answer
344 views

MySQL SELECT blocking an INSERT?

Is it possible for a SELECT query to block INSERT / ALTER queries? I have the following (taken from ENGINE INNODB STATUS) on my slave database: ---TRANSACTION 26DA7060, not started mysql tables in ...
4
votes
1answer
71 views

Mysql transaction READ REPEATABLE and READ COMMITTED read view [closed]

I've come across something strage using Amazon RDS (MySQL 5.6.23). I had issues when concurrent transactions were locking and then calculating a value from multiple tables. The following is a quick ...
11
votes
1answer
563 views

MySQL Commited data not seen to select query

Context: The framework used is Spring and all queries are run with JdbcTemplate. Mysql Server version is 5.6.19. The table is an InnoDB table and defaults like auto commit and isolation level ...
1
vote
0answers
45 views

Will longer DB transactions make calls to other DB wait?

I have a fundamental question but unable to find precise information online. I opened up a DB transaction (SQL Server) and making multiple inserts, updates, delete etc; the entire process takes about ...
1
vote
1answer
95 views

What is the correct implementation of handling concurrent SQL inserts while ensuring a non-primary key column (i.e. wid) unique and auto-incremental?

What is the correct implementation of handling concurrent SQL inserts while ensuring a non-primary key column (i.e. wid) unique and auto-incremental? Note: There was a design constraint that led this ...
1
vote
1answer
41 views

PostgreSQL visibility of records changes from other transaction inside the current one

I have a table "tst" which has a "status" column using which we process records in that table. Once the records are processed we set the status to 'Y'; #\d tst Table "core.tst" ...
0
votes
1answer
20 views

How to name a new table storing location at which transaction occurred [closed]

My client wants to begin collecting data about where transactions occurred. We have a list of their events and locations where payments might be received, I'm just stumped on what to call the table ...
1
vote
1answer
108 views

SSIS Transaction Scope

My question is in regards to the scope of a transaction when using SSIS transactions. If I have a sequence container and it is marked as "transaction required" and I have tasks in that sequence ...
2
votes
2answers
79 views

CLR/C# equivalent to XACT_STATE()

I am porting a set of T-SQL stored procedures to C#/CLR. In the T-SQL, we use XACT_STATE() to determine if an error requires rolling back to a savepoint or rolling back the transaction entirely. I ...
2
votes
1answer
378 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 ...
2
votes
2answers
812 views

Modeling invoices and orders

I have a problem in modeling a database that contains orders and invoices. Actually it's more of a problem from a business point of view, but it's related to modeling the database nonetheless. Model ...
3
votes
0answers
94 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 ...
1
vote
2answers
132 views

Rollback Committed transaction in SQL Server

Is it possible to rollback a committed transaction? I have deleted all the data in a table. The delete statement is inside Begin Transaction and I have committed the transaction with a commit ...
2
votes
2answers
249 views

Locking issues under transaction on Postgres

I recently got a "Out of shared memory - You might need to increase max_locks_per_transaction" error. This is a long running process where I import a bunch of CSV files after proper processing. I ...
1
vote
1answer
377 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 ...
4
votes
1answer
74 views

Persistent inserts in a UDF even if the function aborts

I have a rather complicated UDF (moves around a bunch of tables as well as creates a bunch of new ones) where multiple aborts may occur. Before every operation I would like to record the time when an ...
6
votes
2answers
530 views

Avoid unique violation in atomic transaction

Is possible to create atomic transaction in PostgreSQL? Consider I have table category with these rows: id|name --|--------- 1 |'tablets' 2 |'phones' And column name has unique constraint. If I ...
5
votes
2answers
829 views

What happens if a client connection is killed while holding a lock?

What happens if a client establishes a transaction, locks a row or table, and the client process crashes before it has a chance to rollback or commit the transaction? What, if anything, does SQL ...
2
votes
2answers
74 views

Keep local variable after rollback in mysql

I wish to keep local variable from stored procedure even if rollback occurres. In following procedure, i "register" numbers to users. The procedure takes user_id, value_from and value_to as ...
1
vote
1answer
180 views

parent child records - cascade deletes or transactions?

I'm about to create a parent and child table. In planning how to do CRUD operations on this data, I was wondering what is better design when it comes to deleting data. I'm using SQLite. I know ...
2
votes
1answer
461 views

Exclusively access a table and prevent other queries, even read queries

I'm stuck at setting transaction isolation level. Here's my scenario that happens in the application: Get unprocessed messages (using the IsProcessing flag) Set their IsProcessing to true (in RAM) ...
8
votes
1answer
889 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 ...
0
votes
0answers
487 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
1answer
209 views

Simultaneous READ COMMITTED transactions updates a select for update columns

I have a READ COMMITTED transaction in which I am trying to update a row and increment a column value till it reaches a bucket value contained in another column. Please see the code below CREATE ...
2
votes
1answer
604 views

MySQL: Why is inserting data with transactions faster then without them

I am using stored procedure to generate sequence consisting of prefix and number in given range (etc sequence "AB100", "AB101", ..., "AB199", "AB200") The stored procedure includes REPEAT loop, in ...