• subscribe
June 26, 2002 12:00 AM

Rolling Back a Transaction in the Transaction Log File

SQL Server Pro
InstantDoc ID #25296
Downloads
25296.zip

How can I use T-SQL to roll back the one transaction (for example, ID 0000:0010a183) that I found in the transaction log file?

To prevent data corruption, SQL Server doesn't support the rollback of individual transactions. For example, let's say that two transactions, T1 and T2, use a cash balance field. T1 adds USD 500, and T2 makes a change by using that new value. If you then roll back T1, T2 might be wrong. However, you can restore a log to a predefined mark or a point in time by using timestamps, as Listing 1 shows, or transaction log marks, as Listing 2, page 50, shows.



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here
  • SP1?
    I know there is a SP1 for SQL 2008 R2 available....and there is a "feature pack" as well... ...
  • SQL database mirroring
    I have SQL Server 2008 R2 Enterprise 64bit on Windows 2008 R2 Enterprise 64bit.  Each SQL Server has...
  • Dell Compellent Disk Drive
    Does anybody has experience with Dell Compellent Disk Drive? Basically, this system manages all disk...
  • Sql server performance tuning
    I need to find a tool that help me to optimize sql server,queries,improve the performance and solve ...