Optimizing Procedural Code Understanding Logging, Recovery, Locking and Performance Presentation Addition Understanding/Optimizing VLFs Kimberly L. Tripp.

Slides:



Advertisements
Similar presentations
Microsoft SQL Server Administration for SAP Administration and Troubleshooting.
Advertisements

© 2009 IBM Corporation March 1, 2009 Log File Management in DB2 for Linux, UNIX, and Windows Ron Castelletto IBM Canada Lab
SharePoint and SQL Server integration Demo: SQL Server Optimizing Configurations SQL Server 2014 for SharePoint 2013 Avoiding ginormous transaction.
File System Implementation
File System Implementation
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Microsoft SQL Server Administration for SAP Database Backup and Restore.
Proper Care and Feeding of your SQL MDB -Recommendations for General MDB Maintenance -Read the notes on the foils! -Revised October
Week 9 – Chapter 8 SQL 710 Methods to Backup Databases
Module 6: Backing Up Databases. Overview Preventing Data Loss Setting and Changing a Database Recovery Model SQL Server Backup When to Back Up Databases.
Oracle9i Database Administrator: Implementation and Administration
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Database Configuration and Maintenance Database Configuration and Maintenance Exam / 30.
Tuning SQL Server 2012 for SharePoint 2013 Jump Start 01 | Key SQL Server and SharePoint Server Integration Concepts (50 minutes) Dedicated Server or.
Presented by Joseph Galvan & Stacy Kemp BACKUPS.  Using database backups, a database administrator (DBA’s) can restore from the last backup or to a specific.
Modification is sent by application to SQL Server Modification is sent by application to SQL Server 1 Data pages are located in, or.
Transaction log grows unexpectedly
Optimizing SQL Server 2012 for SharePoint 2013 SharePoint Saturday/Friday, Honolulu March 27, 2015.
Introduction to Oracle Backup and Recovery
DBA Quick Start What do you do when you’ve fallen into a job as a DBA? Take a deep breath, Find out what you’ve got, And dive right in!
Virtual techdays INDIA │ September 2011 Tips for Successful SQL Server Deployment in Enterprise Environment Balmukund Lakhani │ Technical Lead –
SQL Server 2008 Implementation and Maintenance Chapter 7: Performing Backups and Restores.
Module 8: Server Management. Overview Server-level and instance-level resources such as memory and processes Database-level resources such as logical.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
1 Chapter Overview Creating a User Database Setting Database Options Managing User Database Size Placing Database Files on Multiple Disks.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 13 Managing Databases with SQL Server 2000.
Agenda Journalling More Embedded SQL. Journalling.
Monday, 13 October 2003 The Anatomy of a Data Modification Subset of: What everyone should know about Performance, Recovery & Logging Monday, 13 October.
Chapter 2: Designing Physical Storage MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study Guide (70-443)
1 Demystifying the Transaction Log. 2 Rob Canzonire Advisory Database Administrator at Blue Cross Blue Shield of Louisiana Microsoft Certified Solutions.
Module 3: Managing Database Files. Overview Introduction to Data Structures Creating Databases Managing Databases Placing Database Files and Logs Optimizing.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
Agenda for Today Chapter 5 –Skip Lesson 2 Review questions Midterm Chapter 6 Review questions.
Databases Lesson 5.
Introduction Journal Analysis and Optimization Journaling Uses and Benefits Understanding Costs and Implications Ongoing Management and Administration.
Database Systems Slide 1 Database Systems Lecture 5 Overview of Oracle Database Architecture - Concept Manual : Chapters 1,8 Lecturer : Dr Bela Stantic.
MS SQL by: Bryan Bankhead CIS 407. General Concepts  Backing up and Restoring databases and transaction logs is a way that SQL Server provides protection.
Module 10: Maintaining Active Directory. Overview Introduction to Maintaining Active Directory Moving and Defragmenting the Active Directory Database.
Pedro Azevedo Lopes Premier Field Engineer Microsoft Corporation.
Understanding Logging & Recovery What Programmers Always Avoid Until it’s too Late! Kimberly L. Tripp Principal Mentor, Solid Quality Learning at
Transactions and Locks A Quick Reference and Summary BIT 275.
1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 15: Reliability and Security in Database Servers Instructor’s.
Jason Wong Applications Manager DBA/Developer Programmer …. 20+ years IS&T, DEV,
1 Chapter Overview Understanding Data Restoration Issues Understanding the Types of Database Backups Understanding the Restoration Process.
The Self-managing Database: Proactive Space and Schema Object Management Amit Ganesh Director, Data, Space and Transaction Processing Oracle Corporation.
Backup and Recovery - II - Checkpoint - Transaction log – active portion - Database Recovery.
Data Disaster Recovery Planning Greg Fibiger 1/7/2016.
1-1 Copyright © Oracle Corporation, All rights reserved. Redo Logs and Recovery John Hibbard Senior Principal Instructor Minneapolis MN
# CCNZ What is going on here???
DBA Quick Start What do you do when you’ve fallen into a job as a DBA? Take a deep breath, Find out what you’ve got, And dive right in!
Hitting the SQL Server “Go Faster” Button Rob Douglas #509 | Brisbane 2016.
Database Administration
Data, Space and Transaction Processing
SPR301 The Accidental DBA Survival Tips, Tricks, and Techniques
Inside transaction logging
Redo Logs and Recovery John Hibbard Senior Principal Instructor
Finding more space for your tight environment
Designing Database Solutions for SQL Server
Get Into the Goldilocks Zone
Location of Cluster Files and Folders
Hitting the SQL Server “Go Faster” Button
Oracle9i Database Administrator: Implementation and Administration
Inside transaction logging
Turbo-Charged Transaction Logs
Overview: File system implementation (cont)
Transaction Log Internals and Performance David M Maxwell
Chapter 11 Managing Databases with SQL Server 2000
Transaction Log Performance Tuning
Backup & Recovery.
Accelerated DATABASE RECOVERY
Presentation transcript:

Optimizing Procedural Code Understanding Logging, Recovery, Locking and Performance Presentation Addition Understanding/Optimizing VLFs Kimberly L. Tripp President/Founder

Enterprise Database Administration and Deployment SIG  Pre-conference Workshop  Tuesday, September 28  8:30 am – 4:30 pm How the Transaction Log Works  On commit, activity is written to the log – active and likely sequential  Activity moves through log sequentially, fills and then goes to a second file or autogrows  Excessive autogrowth causes:  Slight pause on autogrow  Windows call to extend a file (may cause file fragmentation)  Adds “VLFs” to the file on each autogrowth Virtual Log File 4 Virtual Log File 5 Virtual Log File 1 Virtual Log File 2 Inactive Virtual Log File Min LSN (first open tran) Active Virtual Log File Inactive/Unused Log File Start Logical Log End Virtual Log File 3 Inactive Virtual Log File

Enterprise Database Administration and Deployment SIG  Pre-conference Workshop  Tuesday, September 28  8:30 am – 4:30 pm Transaction Log Optimization  Pre-allocate the log to the appropriate size  Minimize autogrowths  Log might NOT show 0 Percent Log Used after backup for example - the % Log Used will be ~6%  Disk Bound Systems might experience some performance degradation at log backup  Consider RAID 1+0 instead of RAID 1, RAID 5 generally is not recommended  Optimize existing file – minimize VLFs

Enterprise Database Administration and Deployment SIG  Pre-conference Workshop  Tuesday, September 28  8:30 am – 4:30 pm Minimize VLFs Excessive VLFs add overhead to log related activities: Excessive VLFs add overhead to log related activities:  Transaction logging  Log Backups – may cause problems in clearing the log as well…  Logreader (replication)  After Triggers (inserted/deleted), etc.) Should have less than 50 Should have less than 50 BPA (Best Practices Analyzer only generates warning if over 200) BPA (Best Practices Analyzer only generates warning if over 200)

Enterprise Database Administration and Deployment SIG  Pre-conference Workshop  Tuesday, September 28  8:30 am – 4:30 pm Minimize VLFs Execute DBCC LOGINFO Execute DBCC LOGINFO  Number of rows = Number of VLFs If excessive (> 50) then: If excessive (> 50) then:  Free up log space by first clearing space from the transaction log (using BACKUP LOG)  If your Database Recovery Model is FULL or Bulk_Logged then perform a regular transaction log backup – this should remove the inactive portion of the log  If your Database Recovery Model is Simple then clear the log

Enterprise Database Administration and Deployment SIG  Pre-conference Workshop  Tuesday, September 28  8:30 am – 4:30 pm Minimize VLFs Shrink the transaction log file Shrink the transaction log file DBCC SHRINKFILE(logfilename, TRUNCATEONLY) Alter the Database and modify log file size to a more appropriate size (not requiring all of the autogrowth) in ONE increment Alter the Database and modify log file size to a more appropriate size (not requiring all of the autogrowth) in ONE increment ALTER DATABASE dbname MODIFY FILE ( NAME = name, SIZE = new_size ) MODIFY FILE ( NAME = name, SIZE = new_size )