Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Stairway to Transaction Log Management in SQL Server, Level 2: A Brief Overview of Transaction Log Architecture Expand / Collapse
Author
Message
Posted Friday, September 16, 2011 1:53 PM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 6:52 PM
Points: 20, Visits: 472
Great series. Read the first 5. Are these levels to follow?

Level 6, Managing the Transaction Log in Bulk Logged Mode.

Level 7 – Sizing and Growing the Transaction Log

Level 8 – Help, my log is full

Jeff Langdon
@jlangdon
Post #1176632
Posted Friday, November 30, 2012 9:00 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, June 12, 2014 2:25 PM
Points: 45, Visits: 45
It's well-written and I thought I understood, but when I tried to apply what I learned, I found something that didn't make sense. We have a 1.8G database with a 1.5G log - which sounds way too big, except I remember when it was up to a 3.5G log.
I ran the command, DBCC Loginfo, which showed 399 rows, all with status 0. I assumed that meant there'd been no activity since I ran the log backup, so I went in and updated some of my timesheet, checked the LogInfo again - and there was no change.
Of course, the transactions would have been committed, so it's not like they're required for a rollback, but they haven't been backed up. The space they're using shouldn't be reusable at this point, should it? That should make it state 2, which should make the status on one of those record = 2.
Am I missing something? And anticipating the first question, yes I made sure that I was doing the command on the correct database.
Post #1391400
Posted Friday, November 30, 2012 9:20 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: Administrators
Last Login: Monday, November 10, 2014 10:34 AM
Points: 569, Visits: 1,036
Hi Bev,

Have you treble-checked . I'm pretty sure one of those 399 rows must have a value of 2 (active). As soon as you create a database, some info gets written to its log file and one of the VLFs will be active.

USE master;
go
CREATE DATABASE NewTest;

USE NewTest;
go
DBCC LogInfo;

As for space resue - this does require a log backup if the database is in FULL recovery model, but not in SIMPLE.
Post #1391416
Posted Friday, November 30, 2012 12:13 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, June 12, 2014 2:25 PM
Points: 45, Visits: 45
Damn if you weren't right. I ran it again, and then, just to humor you of course, I began moving through 399 records one at time. At the 294th click of the down arrow, I found myself staring at a 2.
This series has helped me in another way. I think the reason the log file is so huge and at the same time so empty is that I was asked to rebuild all indexes about a month ago. I will be adding to the job some code to switch it to bulk insert recovery and then back to full after the rebuild is done. After I finish the Level 7 article and hopefully find the best code to shrink it.
Post #1391491
Posted Saturday, April 6, 2013 10:36 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, August 4, 2014 9:29 PM
Points: 459, Visits: 428
Is level 8 published anywhere?
Post #1439618
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse