Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Stairway to Transaction Log Management in SQL Server, Level 2: A Brief Overview of Transaction Log...


Stairway to Transaction Log Management in SQL Server, Level 2: A Brief Overview of Transaction Log Architecture

Author
Message
Jeff Langdon
Jeff Langdon
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 678
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
bev.kaufman
bev.kaufman
SSC Rookie
SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)

Group: General Forum Members
Points: 45 Visits: 48
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.
Tony Davis
Tony Davis
Mr or Mrs. 500
Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)

Group: Administrators
Points: 591 Visits: 1148
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.
bev.kaufman
bev.kaufman
SSC Rookie
SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)

Group: General Forum Members
Points: 45 Visits: 48
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.
dkschill
dkschill
SSC-Addicted
SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)

Group: General Forum Members
Points: 459 Visits: 430
Is level 8 published anywhere?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search