sqlschool.gr logo

articles

Articles of SQLschool.gr Team

What is Log Block and Log Record

Antonios Chatzipavlis
Saturday 20 January 2018

Σε προηγούμενο άρθρο μου στο οποίο έγραφα για το τι είναι το Log Sequence Number (LSN) αναφέρθηκα σε δύο στοιχεία του transaction log. Τα στοιχεία αυτά ήταν το Log Block και το Log Record.

Αυτά τα δύο μαζί βοηθάνε στην ανάγνωση του transaction log και οι έμπειροι με το SQL Server μπορούν γρήγορα να καταλάβουν το transaction log.

Όπως έχω γράψει και σε παλαιότερα άρθρα μου αλλά και σε sessions (SQL Nights) το transaction log αποτελείται από Virtual Log Files (VLF).

Log Block

Το κάθε VLF χωρίζεται σε Log Blocks και μπορεί περιέχει ένα ή περισσότερα Log Blocks

Το κάθε Log Block έχει μέγεθος που είναι πολλαπλάσιο των 512 bytes αλλά δεν μπορεί να ξεπεράσει τα 60ΚΒ.

To κάθε Log Block είναι μια συλλογή από log records που έχουν γραφτεί στο δίσκο μαζί δηλαδή με την ίδια ενέργεια.

Για την ευκολία στην κατανόηση του αντιστοιχίστε το με τη δομή ενός page που έχουμε στα data files το οποίο περιέχει header (metadata), body (records) και slot arrays (offsets).

Log Record

Το Log Record είναι μια μεμονωμένη εγγραφή ενέργειας που έχει γίνει στο SQL Engine.

Είναι η μικρότερη μονάδα του transaction log.

Σημείωση

Κρατήστε την πληροφορία αυτή καθώς σε επόμενα άρθρα μου θα μας χρειαστεί.


//antonch


Antonios Chatzipavlis

Antonios Chatzipavlis

Antonios Chatzipavlis is a highly experienced Data Solutions Consultant and Trainer. He has been working in the IT industry since 1988, holding various roles such as senior developer, IT Manager, Data & AI Solutions Architect and Consultant.

Since 1995, Antonios has focused on modern technologies and software development tools, primarily by Microsoft. He has specialized in Data & AI since 2000, with expertise in Microsoft Data Platform (SQL Server, Azure SQL Databases, Azure Synapse Analytics, Microsoft Fabric, Power BI, AI) and Databricks.

Antonios is also a Microsoft Certified Trainer (MCT) for over 25 years, has been recognized as a Microsoft Most Valuable Professional (MVP) in Data Platform since 2010 and he is in the Data Expert 40 Powerlist 2024 by Boussias. He is the co-founder and visionary behind XLYTiCA, a company dedicated to Data & AI solutions.

Episode

Task Flows in Microsoft Fabric

image

More Episodes...

Tip

Get Certified: Become a Fabric Data Engineer

More Tips...

Become a member

If you want to receive updates from us become a member to our community.

Connect

Explore

Learn

sqlschool.gr © 2010-2025 All rights reserved

This site uses cookies for operational and analytics purposes only. By continuing to browse this site, you agree to their use.