Would it be possible rollback transactions using Transactionlog file for a particular record?
I am using SQL Server 2005.
You just have to write the statement ROLLBACK TRANSACTION, followed by the name of the transaction that you want to rollback.
SQL RollBack ROLLBACK is the SQL command that is used for reverting changes performed by a transaction.
COMMIT permanently saves the changes made by the current transaction. ROLLBACK undo the changes made by the current transaction. 2. The transaction can not undo changes after COMMIT execution.
Natively, no. I believe there are some pricey third party tools to do this, though.
Alternatively, you can restore your DB from a backup, and then RESTORE LOGS
to a point in time with the STOPAT = '6/30/2009 2:30PM'
argument.
There are Apex and SQL Log Rescue available. If your logs aren't in FULL
recovery mode, though, you may be up a creek if you can't restore.
From what I know your options are ApexSQL Log (pricey but has a free trial) or undocumented SQL Server commands such as DBCC Log and fn_dblog.
Any of these will only work if your database was in full recovery mode, in which case SQL Server stores a lot more details in transaction log.
Also I don’t think this works for any type of transaction. I’ve seen people using this technique for reverting insert, update, delete but I’m really sure if it can be used to revert say ALTER TABLE or something like that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With