Ending a transaction by reverting to the changes made by the transaction.
2
votes
2answers
67 views
Partial rollback doesn't decrement trancount
Suppose I have an open SQL Server session, and do the following:
begin tran
insert into People (Id) values (1)
select @@TRANCOUNT -- Prints 1
save transaction tt
begin tran
select @@TRANCOUNT ...
2
votes
2answers
83 views
How to rollback the identity seed after deadlock
Now that's an approximate sequence of operations Im performing:
SET IDENTITY_INSERT <table-name> ON;
INSERT SOMETHING to <table-name> with explicitly specifyed id
DECLARE @oldID bigint
...
1
vote
1answer
49 views
Does a transaction cover the subroutines?
When I begin transaction and exec a stored procedure, does that transaction cover the changes made by the stored procedure I executed? Would a rollback transaction cancel the changes made by the ...
2
votes
1answer
64 views
Rolling Back DB Changes After Deployment Edge Cases
I manage a mixed DB environment and our programmers could use some good rollback options. I was thinking of using SQL Compare, Red Gate Source Control, and a few other tools but I can't figure out ...
3
votes
1answer
461 views
Deleting MySQL table with pending transactions
Is there a way to delete an InnoDB table or database with pending transactions in MySQL (preferably on file system level)?
What happened:
I use MySQL 5.5.28 and ran LOAD DATA INFILE… to import a ...
3
votes
3answers
256 views
Rollback group of DDL statements
Working in SQL Server 2008 R2, I am trying to rollback a set of DDL statements as a group (think of an upgrade script for a database), but am running into trouble.
Take the following code:
begin try
...
1
vote
1answer
543 views
How do Savepoints work in Oracle?
I'm doing pretty serious operations on my DB and I would like to keep my data safe.
Unfortunately something is going wrong, look:
SAVEPOINT before_foo_update;
CREATE TABLE AUX_FOO as
SELECT * ...
2
votes
1answer
311 views
Rollback generate scripts
During the development of applications users often want to add new modules, business rules etc. So I've often used SQL Server 2008 option to create scripts from the development DB to generate new ...
4
votes
3answers
257 views
Can I change table structure in a transaction and then roll it back if there is an error?
I have some ALTER TABLE statements that I am running. Not all of them work (they are the result of running SQL Data Compare) and I want to group them in some transactions and roll back the statements ...
8
votes
2answers
822 views
MongoDB Replica Set SECONDARY Stuck in `ROLLBACK` State
During a recent automated update of our mongodb PRIMARY, when the PRIMARY stepped down it permanently went into a ROLLBACK state.
After several hours in the ROLLBACK state, there was still no ...
2
votes
1answer
107 views
If i issue a rollback when recovery mode is bulk logged, will my bulk operations be rolled back?
If my recovery model is BULK LOGGED, I'm in a transaction, and I've issued some statements that are minimally logged like SELECT * INTO, will a ROLLBACK undo those minimally logged statements?
2
votes
1answer
430 views
Save Transaction: Is the name local to the stored procedure or not?
Some foot shooting just occured on a production server. I fixed the problem, but I'm now rather confused.
There is a subset of stored procedures that preserve state on failure. That is, if the ...
4
votes
2answers
155 views
Can I be notified of a rollback in my DDL Trigger?
I'd like DDL changes in SQL Server to trigger an external process (outside of SQL). The problem is, is there a way for me to be notified via my trigger that a rollback occurred?
For instance, with ...
2
votes
1answer
246 views
Postgresql revert back database value
I have postgresql database.
My table name is tblvoippolicy. Now, problem is by mistake i have deleted some records from table.
When I get the data file using following commands.
select * from ...
5
votes
1answer
320 views
If an 'after' DDL trigger causes an error, is the DDL rolled back?
It has been suggested that DDL is logically performed something like this:
begin
COMMIT;
perform any appropriate pre-DDL trigger code;
do the ddl;
perform any appropriate post-DDL ...
3
votes
1answer
712 views
What does the base64 BINLOG statements in mysqlbinlog output mean?
I have looked over the mysqlbinlog command as a candidate for rollback method from MySQL 5.5 to MySQL 5.0.
When I ran the command on one of the bin-log files in the MySQL 5.5 server, I've noticed ...
2
votes
1answer
94 views
Do IOTs generate significantly more undo per block for deletes?
IOTs are an index-like structure. When deleting large contiguous chunks of data, how much undo is generated as compared to a similar contiguous delete from a heap?
11
votes
4answers
2k views
Is ROLLBACK a fast operation?
Is it true that RDBMS systems are optimized for COMMIT operations? How much slower/faster are ROLLBACK operations and why?
11
votes
4answers
1k views
Why won't some DBMS's allow rollback for certain DDL statements?
Recently I found out that MySQL doesn't support rollback of DDL such as "alter table"... Being used to PostgreSQL, that struck me as odd, but a friend of mine told me that even Oracle doesn't allow ...