Backup, Integrity Check and Index and Statistics Maintenance

Slides:



Advertisements
Similar presentations
SQL-BackTrack for Sybase
Advertisements

© 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 1 IT390 Business Database Administration Unit 10:
SQL Server 2005 Implementation and Maintenance Chapter 10: Maintaining and Automating SQL Server.
Database Optimization & Maintenance Tim Richard ECM Training Conference#dbwestECM Agenda SQL Configuration OnBase DB Planning Backups Integrity.
SharePoint and SQL Server integration Demo: SQL Server Optimizing Configurations SQL Server 2014 for SharePoint 2013 Avoiding ginormous transaction.
SQL Server 2005 Database Engine Sommarkollo Microsoft.
Backup, Integrity Check and Index and Statistics Maintenance
Module 12: Backup and Recovery. Overview Backup and recovery methods available in Oracle and SQL Server 2008 Types of failure Types of recovery Formulating.
CS27510 Commercial Database Applications. Maintenance Maintenance Disaster Recovery Disaster Recovery.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Designing Custom Maintenance Plans with TSQL By John Miner.
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
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.
Module 1: Introduction to Microsoft SQL Server 7.0.
1 Chapter Overview Creating a User Database Setting Database Options Managing User Database Size Placing Database Files on Multiple Disks.
Informix IDS Administration with the New Server Studio 4.0 By Lester Knutsen My experience with the beta of Server Studio and the new Informix database.
Chokchai Junchey Microsoft Product Specialist Certified Technical Training Center.
SQL Server 2014: Overview Phil ssistalk.com.
Learningcomputer.com SQL Server 2008 – Administration, Maintenance and Job Automation.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Module 16: Performing Ongoing Database Maintenance
SQL Server Management Tools Lesson 28. Skills Matrix.
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
Week 7 : Chapter 7 Agenda SQL 710 Maintenance Plan:
1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.
SQL School is strongly committed to provide COMPLETE PRACTICAL REALTIME Trainings on SQL Server Technologies – Dev, SQL DBA, MSBI (SSIS, SSAS, SSRS) and.
Esri UC 2014 | Technical Workshop | Administering Your Microsoft SQL Server Geodatabase Shannon Shields Chet Dobbins.
Martin Cairney Hybrid data platform – making the most of Azure plus your on- prem kit DAT341 B.
MISSION CRITICAL COMPUTING Siebel Database Considerations.
Maintenance Practices. Goal  Automate the necessary DBA chores to put organizations on the path of having healthier, consistent and more trustworthy.
Praveen Srivatsa Director| AstrhaSoft Consulting blogs.asthrasoft.com/praveens |
Making DBCC CHECKDB Go Faster Argenis Fernandez Senior Database Engineer
SQL SERVER MAINTENANCE PLANS Kat
Strategies for Working with Texas-sized Databases Robert L Davis Database Engineer
Linkedin: dennisegraham Dennis E Graham Reporting For SQL Health.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
You Inherited a Database Now What? What you should immediately check and start monitoring for. Tim Radney, Senior DBA for a top 40 US Bank President of.
SSIS ETL Data Resource Management. Create an ETL package using a wizard database server to database server The business goal of this ETL package is to.
Thank You! Local PASS Community & Sponsors!. Restoring a SQL Server database from Azure Blob Storage (200-level) Randolph
Dealing with Database Corruption DBA 911. Who am I? 2 David M Maxwell twitter.com/dmmaxwell or twitter.com/upsearchsqltwitter.com/dmmaxwelltwitter.com/upsearchsql.
Blog.eardley.org.uk SharePoint Databases What you need to know Alan Eardley SQL Saturday Exeter 25 April 2015.
ProgressBook Suite Maintenance
You Inherited a Database Now What?
Automated Restore Script Output for Ola Hallengren’s Maintenance Solution 1) Start SQL Services on Local 2) Connect to Azure AlwaysOn 3) Delete all maintenance.
Tips for SQL Server Performance and Resiliency
A big party is being held to honor relational database systems and their impact on modern society. Outside the venue, the host awaits the guests. The.
About PASS The PASS community encompasses everyone who uses the Microsoft SQL Server or Business Intelligence Platforms. This includes database administrators,
Disaster Recovery Where to Begin
Database Corruption Advanced Recovery Techniques|
Designing Database Solutions for SQL Server
Introduction to SQL Server Management for the Non-DBA
Database Administration for the Non-DBA
Tips for SQL Server Performance and Resiliency
Dynamics AX Performance
Tuning Your Maintenance Plans
The Ultimate Maintenance Plan By Ed Roepe Perimeter DBA, LLC
Re-Indexing - The quest of ultimate automation
Backup and Restore your SQL Server Database
Peter Shore SQL Saturday Cleveland 2016
The Ultimate Maintenance Plan By Edward Roepe Perimeter DBA, LLC
AlwaysOn Availability Groups
You Inherited a Database Now What?
Top 5 TIPS TO KEEP Always on AGs humming and users happy
Building a Performance Monitoring System using XEvents and DMVs
Make Your Maintenance Plans…
Sql Saturday Philadelphia
Ch 10. Maintaining and Automating SQL Server
The DBA Quit and now you’re it:
Presentation transcript:

Backup, Integrity Check and Index and Statistics Maintenance - Inside Ola Hallengren's Maintenance Solution

About Me Ola Hallengren http://ola.hallengren.com E-mail: ola@hallengren.com DBA in Saxo Bank, a Danish investment bank Microsoft MVP – SQL Server

An Overview Based on stored procedures SQL Server 2005 - 2014 DatabaseBackup - Backup DatabaseIntegrityCheck – Integrity Check IndexOptimize – Index and Statistics Maintenance

DatabaseBackup Full, differential and transaction log backup Backup to local drives, network shares or Azure Blob Storage (Beta) Striping of backups to multiple files, and drives / network shares Builtin logic for backup of AlwaysOn Availability Groups Checksum, Compression and Encryption Supports Red Gate SQL Backup, LiteSpeed and Idera SQL safe Automatic handling of new databases Options MAXDOP, BUFFERCOUNT and MAXTRANSFERSIZE 

DatabaseIntegrityCheck DBCC CHECKDB DBCC CHECKFILEGROUP DBCC CHECKTABLE DBCC CHECKALLOC DBCC CHECKCATALOG Options PHYSICAL_ONLY and NOINDEX

Index Maintenance – Challenges Indexes are getting fragmented over time, which has a negative impact on performance Rebuilding and reorganizing indexes uses system resources and generates blocking Large databases and limited maintenance windows

Index Maintenance – Checking the Fragmentation Checking the fragmentation using sys.dm_db_index_physical_stats Only rebuild or reorganize indexes that are fragmented Rebuild heavily fragmented indexes Reorganize moderately fragmented indexes

Index Maintenance - Rebuild and Reorganize Limitations Online rebuild only in Enterprise Edition Xml – indexes and spatial indexes cannot be rebuilt online Indexes with image or text cannot be rebuilt online Indexes with varchar(max), nvarchar(max), or varbinary(max) – Online rebuild only in SQL Server 2012 and 2014 Index partition – Online rebuild only in SQL Server 2014 An index with page locking disabled cannot be reorganized

IndexOptimize Checking the fragmentation Three fragmentation groups; low, medium and high Lets you define the fragmentation thresholds Lets you define your preferred index maintenance for each group Fallback index maintenance in case your preferred index maintenance is not supported for an index Updating of statistics If an index is rebuilt, updating of statistics for that index is skipped

Selecting Databases Common parameter for DatabaseBackup, DatabaseIntegrityCheck and IndexOptimize Select All Databases, All User Databases or All System Databases Select a single database or a list of databases Exclude databases Select databases using wildcards

Job Execution SQL Server Agent T-SQL Job Step Execution is aborted after first error SQL Server Agent CmdExec Job Step, sqlcmd (and the –b option) Execution continues after an error, and the job reports failure in the end (recommended)

SQL Server Agent Tokens Using SRVR for the local SQL Server instance Using SQLLOGDIR (new token in SQL Server 2014) for the output – file directory, that makes it easy to move a job between servers Using JOBID, STEPID, STRTDT, and STRTTM in the output – file name to get unique file names

Links Download script: http://ola.hallengren.com/downloads.html Documentation: http://ola.hallengren.com/sql-server-backup.html http://ola.hallengren.com/sql-server-integrity-check.html http://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html License: http://ola.hallengren.com/license.html

Questions? E-mail: ola@hallengren.com