Questions tagged [transaction-log]

transaction log is a log file of all actions performed on a database. It helps keep consistency and recover from unexpected failures.

The Transaction Log is a log file that keeps an audit trail of all actions performed on a database. This allows the database system to recover from unexpected shutdowns like power failures. Usually, the system will roll back changes made by uncommitted transactions and re-apply any committed transaction that did not make it to the database. This is done to keep ensure the atomicity and durability of transactions.

The transaction log can also be used to recover accidentally changed or deleted data.

197 questions
2
votes
3 answers

How do I undo an update statement I made to a database

It's a test environment, I needed some data to test an Update query, but accidentally updated a column in all rows to have wrong data. Must I use a backup to restore the data back to the previous instance, or is there some secret with transaction…
Haoest
  • 13,610
  • 29
  • 89
  • 105
2
votes
1 answer

Creating a table with volatile columns at first to reduce log size

I am not sure about this, but I think I read it before, and I would like to know if that is true or false: When creating tables, it is better to put volatile columns first and then the static columns. I mean, to put the columns that will be…
AngocA
  • 7,655
  • 6
  • 39
  • 55
2
votes
4 answers

How to truncate and shrink log files?

How to truncate and shrink large log files in SQL Server 2005? How to apply truncation at regular intervals? Is there any difference between truncation and shrinking? Thanks in advance
Samiksha
  • 6,122
  • 6
  • 29
  • 28
2
votes
2 answers

Writing to transaction log when log comes to full size

Let's say we have database with defined transaction log initial size to 100MB and maxsize is UNLIMITED. SQL Server will write into log sequentially from start to end. In one book I found next sentence: When SQL Server reaches the end of the file as…
veljasije
  • 6,722
  • 12
  • 48
  • 79
2
votes
3 answers

DB2 Transaction log is full. How to flush / clear it?

I’m working on a experiment regarding to a course I’m taking about tuning DB2. I’m using the EC2 from Amazon (aws) to conduct the experiment. My problem is, however, that I have to test a non-compression against row-compression in DB2 and to do that…
Emil Devantie Brockdorff
  • 4,724
  • 12
  • 59
  • 76
2
votes
1 answer

SQL Server 2005 transaction log is always too big

I've read other posts and have done hours of research but am still none the wiser. I have a database that is 65 gig in the data file, and currently 230 gig in the log file. I'm trying to redesign the database so it is more efficient but when making…
Blootac
  • 525
  • 4
  • 17
2
votes
1 answer

Reverse changes from transaction log in SQL Server 2008 R2?

We have a SQL Server 2008 R2 database that backs up transaction logs every now and then. Today there was a big error in the database caused at around 12am... I have transaction logs up to 8am and then 12am - 16pm - etc. My question is: can I sort…
2
votes
5 answers

How to undo a delete operation in SQL Server 2005?

Our Test DB is suddenly missing rows. We want them back. Is there a way to sift through everything that has happened to the database today? Each SQL statement? I presume this kind of stuff is in the transaction log, but am not sure how to view…
Daren Thomas
  • 67,947
  • 40
  • 154
  • 200
2
votes
1 answer

How to avoid bloating transactionlogs while creating an index?

Does anyone know to avoid bloating transactionlogs while creating an index? My problem: I have a script that creates a lot of Indexes. While running this script, my transactionlog doesn't stop growing. Is there a way, how to reduce logging while…
daman
  • 21
  • 2
2
votes
6 answers

Cannot shrink transaction log,no matter what I do

I have a database whose tlog has grown to 4.5 GB. The db is in full recovery mode and I have tried several transaction log backups coupled with DBCC shrinkfile. And it will not shrink. Does anyone have any ideas? There are several transactions which…
sharadov
  • 968
  • 2
  • 13
  • 32
2
votes
0 answers

Use NLog in Multithreading application skip the log messages

I am using NLog for my simple C#.Net application it works fine. but when i use NLog for C#.Net multithreading application it skips the log messages I also tried to configure NLog.config using AsyncWrapper and AutoFlushWrapper but it does not work…
2
votes
1 answer

Potential causes and solutions for the transaction log in database being full

In the data access layer of my teams ASP.NET application, I run stored procedures against our database through the use of the .NET SQLClient. After adding new code to allow an insert operation on the database, I tested the code, and received the…
2
votes
1 answer

How can I find rows related to a specific table in fn_dblog()

From the various info I have read about fn_dblog() in MS-SQL, I thought that AllocUnitName contained the table name. But recently, I was checking for deletion of a specific table's row but could not find its name in the results returned by…
unubar
  • 416
  • 6
  • 15
2
votes
3 answers

View all transaction logs in SQL Server 2008

The problem is this: t0: Insert is made into my database t1: Delete is executed t2: Full backup is made t3: Transaction log backup is made How can i recover the deleted record after t3 (which is now)? I want the database in a state between t0 and…
usr
  • 168,620
  • 35
  • 240
  • 369
2
votes
1 answer

Handling iCloud Core Data errors

I have a library-style iCloud + Core Data setup. The app I am working on contains user data that sits behind a login screen. After the user logs in, the Persistent Store Coordinator is instantiated and the iCloud store gets added to it. Here is my…
Schoob
  • 1,688
  • 1
  • 14
  • 18