Questions tagged [transaction]
A mechanism for committing a consistent set of changes into a database atomically.
783 questions
0
votes
0
answers
85
views
Temp Table Management in Explicit Transactions and CATCH blocks
Example code below populates a PhoneNumber table and associates those PhoneNumberId's with an OrderNumber.
As written I am getting the error message:
The current transaction cannot be committed and ...
7
votes
3
answers
2k
views
Why didn't the transaction fail?
I used SSMS to add a composite primary key to a table with 64 million rows.
Because the table was so large, I used the change script generated by SSMS. One of the PK fields (REVENUE_CODE) originally ...
0
votes
1
answer
44
views
Saw some strange behavior when using `INSERT ON CONFLICT` inside a transaction
Repro steps:
Create the table:
create table t (col TEXT primary key);
Open two database consoles and use the following queries in them:
1 begin;
2 select txid_current();
3 insert into t (col) ...
0
votes
1
answer
48
views
Advice on transaction log based Reporting Server
I have a reporting database that is kept in sync with the transactional database using transaction log files. The seed file is provided every 3 months and we get 15 min log files.
This database needs ...
0
votes
1
answer
112
views
Is there a way to get transaction time statistics on specific tables
I saw some log entries that indicated transaction time outliers of up to 10s at times, where transaction times are typically below 1s. To get a view of how often this happens, is there a way to get ...
0
votes
0
answers
35
views
Understanding commit_time in dm_tran_commit_table: Insert Time, Timezone, and Latency Concerns
I am currently working with SQL Server and exploring transaction management, specifically the dm_tran_commit_table view. I have a couple of questions regarding the commit_time and change tracking. ...
0
votes
1
answer
43
views
postgres - ok to terminate active connections?
I am wondering whether any really bad things can result from terminating (pg_terminate_backend()).
Or would this at worst result into current transactions not being roled back.
or is current ...
5
votes
1
answer
490
views
Why not use Snapshot isolation for everything read-only?
Suppose that:
I already have Snapshot isolation enabled
I do not have Read Committed Snapshot Isolation enabled
I have been strict with my READCOMMITTEDLOCK hints wherever I truly need them
then is ...
2
votes
2
answers
154
views
PostgreSQL: Finding last executed statement from an "idle in transaction timeout"
Is there any way to log or find last executed statement from a session that terminated because of idle in transaction timeout? We only have slow statement logging and that did not capture it and we ...
0
votes
0
answers
61
views
Does MySQL perform 2PC automatically for internal (mysql only) transactions?
If I have done functional partitioning in my database and have for example a database Transactions and a database Products and these are different database servers and there are references from tables ...
1
vote
3
answers
212
views
Does Postgres abort transaction on error (need reference)?
Does Postgres abort current transactions on error? In any case, can you provide a reference?
Googling "site:postgres.org transaction abort rollback error" produced no results, and GPT ...
0
votes
1
answer
114
views
Stop rolling back transaction by committing them
I have a SQL Server process that runs annually, creating around 400 million records in several tables.
The process operates in a loop, committing every 20,000 records for each of the tables.
I ...
0
votes
1
answer
323
views
Postgres updates xmin on every UPDATE within a transaction
If I do an UPDATE to a row within a transaction, each time xmin increments. I thought that xmin always represents the current tx id. But it seems to be storing current xid + cmin instead.
But when ...
0
votes
2
answers
184
views
Are these transactions normal?
When I run this query
SELECT transaction_id, name, transaction_begin_time, transaction_state
FROM sys.dm_tran_active_transactions
I always have these 6 rows in the result set
transaction_id
name
...
0
votes
2
answers
1k
views
How can a transaction view uncommitted changes made by another transaction in UNCOMMITTED READ
I know this is probably a silly question, It is my first, It seems so fundamental that I can't find the answer anywhere, because it must be so straight forward no one explained it.
I want to ...