ESSENTIAL SKILLS FOR SQL SERVER DBAS

Similar documents
Back From the Dead: How to Restore a SQL Server in 60 Minutes or Less*

Administering Microsoft SQL Server 2012 Databases

SQL Server Database Administrator s Guide

A SURVEY OF POPULAR CLUSTERING TECHNOLOGIES

Outline. Failure Types

Designing, Optimizing and Maintaining a Database Administrative Solution for Microsoft SQL Server 2008

Mind Q Systems Private Limited

SQL Server Transaction Log from A to Z

SQL Server 2012 Database Administration With AlwaysOn & Clustering Techniques

whitepaper ZERO TO HERO 12 ESSENTIAL TIPS FOR THE ACCIDENTAL DBA

6231B: Maintaining a Microsoft SQL Server 2008 R2 Database

Transaction Log Internals and Troubleshooting. Andrey Zavadskiy

MS Design, Optimize and Maintain Database for Microsoft SQL Server 2008

Understanding and Controlling Transaction Logs

NUTECH COMPUTER TRAINING INSTITUTE 1682 E. GUDE DRIVE #102, ROCKVILLE, MD WEB: TEL:

DBA 101: Best Practices All DBAs Should Follow

Recover EDB and Export Exchange Database to PST 2010

Course Syllabus. Microsoft Dynamics GP Installation & Configuration. Key Data. Introduction. Audience. At Course Completion

SQL Server for Database Administrators Course Syllabus

$99.95 per user. SQL Server 2008/R2 Database Administration CourseId: 157 Skill level: Run Time: 47+ hours (272 videos)

Module 07. Log Shipping

Restoring SQL Server Database after Accidental Deletion of.mdf File. SQL Server /06/2016

Exam : Transition Your MCTS on SQL Server 2008 to MCSA: SQL Server 2012, Part 2. Title : The safer, easier way to help you pass any IT exams.

W I S E. SQL Server 2012 Database Engine Technical Update WISE LTD.

This article Includes:

Microsoft SQL Database Administrator Certification

Missed Recovery Techniques for SQL Server By Rudy Panigas

Technical Note. Dell PowerVault Solutions for Microsoft SQL Server 2005 Always On Technologies. Abstract

MS SQL Server DBA Training Course. Table of Contents

MOC 20462C: Administering Microsoft SQL Server Databases

5054A: Designing a High Availability Messaging Solution Using Microsoft Exchange Server 2007

DB2 9 for LUW Advanced Database Recovery CL492; 4 days, Instructor-led

Website Disaster Recovery

Exchange DAG backup and design best practices

Transactions and Recovery. Database Systems Lecture 15 Natasha Alechina

Course 2788A: Designing High Availability Database Solutions Using Microsoft SQL Server 2005

Explain how to prepare the hardware and other resources necessary to install SQL Server. Install SQL Server. Manage and configure SQL Server.

High Availability and Disaster Recovery Solutions for Perforce

Recover a CounterPoint Database

General DBA Best Practices

Database Maintenance Essentials

Appendix A Core Concepts in SQL Server High Availability and Replication

Perforce Backup Strategy & Disaster Recovery at National Instruments

Best Practices Every SQL Server DBA Must Know

IDERA WHITEPAPER. The paper will cover the following ten areas: Monitoring Management. WRITTEN BY Greg Robidoux

SQL Server Maintenance Plans

Destiny system backups white paper

Optimizing SQL Server 2012 for SharePoint SharePoint Saturday/Friday, Honolulu March 27, 2015

ONSITE TRAINING CATALOG

Unitrends Integrated Backup and Recovery of Microsoft SQL Server Environments

MIRRORING: START TO FINISH. Ryan Adams Blog - Twitter

Maintaining a Microsoft SQL Server 2008 Database

Microsoft SQL Server 2008 R2 Enterprise Edition and Microsoft SharePoint Server 2010

Review: The ACID properties

David Dye. Extract, Transform, Load

DATABASE ADMINISTRATION (DBA) SERVICES

WHITE PAPER: ENTERPRISE SECURITY. Symantec Backup Exec Quick Recovery and Off-Host Backup Solutions

EMC MID-RANGE STORAGE AND THE MICROSOFT SQL SERVER I/O RELIABILITY PROGRAM

Handling a Full SQL Server Transaction Log

SQL Server AlwaysOn (HADRON)

High Availability Databases based on Oracle 10g RAC on Linux

VERITAS Storage Foundation 4.3 for Windows

SQL Server 2008 Designing, Optimizing, and Maintaining a Database Session 1

WHAT S NEW WITH EMC NETWORKER

Restore Scenarios What to keep in mind. Pedro A. Lopes PFE

Beginning SQL Server Administration. Apress. Rob Walters Grant Fritchey

Database Backup and Restore Mechanism. Presented by : Mary Meladath

Recovery and the ACID properties CMPUT 391: Implementing Durability Recovery Manager Atomicity Durability

Chapter 14: Recovery System

High Availability and Disaster Recovery for Exchange Servers Through a Mailbox Replication Approach

COS 318: Operating Systems

Bulletproof your Database Backup and Recovery Strategy

Configuring Apache Derby for Performance and Durability Olav Sandstå

CREATING SQL SERVER DISASTER RECOVERY SOLUTIONS WITH SIOS DATAKEEPER

Server 2008 SQL. Administration in Action ROD COLLEDGE MANNING. Greenwich. (74 w. long.)

DATASHEET. Proactive Management and Quick Recovery for Exchange Storage

Best Practices for Upgrading to SQL Server 2012

How To Fix A Fault Fault Fault Management In A Vsphere 5 Vsphe5 Vsphee5 V2.5.5 (Vmfs) Vspheron 5 (Vsphere5) (Vmf5) V

WHITE PAPER PPAPER. Symantec Backup Exec Quick Recovery & Off-Host Backup Solutions. for Microsoft Exchange Server 2003 & Microsoft SQL Server

Boost SQL Server Performance Buffer Pool Extensions & Delayed Durability

High Availability Solutions for the MariaDB and MySQL Database

10775 Administering Microsoft SQL Server Databases

How To Fix A Powerline From Disaster To Powerline

MOC Administering Microsoft SQL Server 2014 Databases

Microsoft SQL Server Guide. Best Practices and Backup Procedures

MCTS Microsoft SQL Server 2005 Implementation & Maintenance

Storage and Disaster Recovery

Course Syllabus. At Course Completion

Data De-duplication Methodologies: Comparing ExaGrid s Byte-level Data De-duplication To Block Level Data De-duplication

Protecting Microsoft SQL Server

Backups and Maintenance

10231B: Designing a Microsoft SharePoint 2010 Infrastructure

Would-be system and database administrators. PREREQUISITES: At least 6 months experience with a Windows operating system.

CA ARCserve and CA XOsoft r12.5 Best Practices for protecting Microsoft SQL Server

High Availability Options for Kronos Workforce Central Suite on SQL Server

SQL Server Storage: The Terabyte Level. Brent Ozar, Microsoft Certified Master, MVP Consultant & Trainer, SQLskills.com

Transcription:

elearning Event ESSENTIAL SKILLS FOR SQL SERVER DBAS Session 2

Session 2 Session 1 DBAS: What, Why, and How. Primary Focus of DBAs: Availability and Security Basic SQL Server Engine and Security. Session 2: Database and File Management. Disaster Recovery

Sizing SQL Server Databases Disk is Cheap. (orly? hadn t noticed) Humans are wired for Scarcity. Best Practices: Grow Large (or grow fragmented) Don t try to scrimp on file space/utilization Rule of thumb: Log files 25% of database file size Make Sure you have enough space to grow or everything STOPs Log Files are also subject to fragmentation.

Sizing SQL Server Databases Disk is Cheap. (orly? hadn t noticed) Humans are wired for Scarcity. Best Practices: Grow Large (or grow fragmented) Don t try to scrimp on file space/utilization Rule of thumb: Log files 25% of database file size Make Sure you have enough space to grow or everything STOPs Log Files are also subject to fragmentation.

Sizing SQL Server Databases Disk is Cheap. (orly? hadn t noticed) Humans are wired for Scarcity. Best Practices: Grow Large (or grow fragmented) Don t try to scrimp on file space/utilization Rule of thumb: Log files 25% of database file size Make Sure you have enough space to grow or everything STOPs Log Files are also subject to fragmentation.

Shrinking Databases Performance Overhead Very Expensive for IO subsystem. Causes significant logging and fragmentation. When to Shrink Databases After Major Changes and Removal of Lots of Data. Multi-tenant system or really busy DB where space is a premium. Shrinking is ALWAYS a trade-off (overhead vs recovered disk) Worst Practices Regularly Shrinking your Databases Auto-Shrink Auto Close

Checking On Servers Mini Demo

Disaster Recovery

Logging Basics Transactions Bank Transfer Example:

Logging Basics Transactions Bank Transfer Example: $1000 Savings Process: Remove $1,000 From Savings Add $1,000 To Checking $3,000 $0 Checking

Logging Basics Transactions Bank Transfer Example: $1000 Savings $2,000 Process: Remove $1,000 From Savings <SERVER CRASH> Add $1,000 To Checking Checking $0 Woops!

Logging Basics Transactions Bank Transfer Example. Safe / Transactionally Sound Example:

Logging Basics Transactions Bank Transfer Example. Safe / Transactionally Sound Example: Log Entry Savings Before: $3,000 Checking Before: $0 Savings After: $2,000 Checking After: $1,000 Savings Process: start transaction Remove $1,000 From Savings Add $1,000 To Checking $3,000 $0 end transaction Checking

Logging Basics Transactions Bank Transfer Example. Safe / Transactionally Sound Example: Log Entry Savings Before: $3,000 Checking Before: $0 Savings After: $2,000 Checking After: $1,000 Savings $2,000 Process: start transaction Remove $1,000 From Savings <SERVER CRASH> Add $1,000 To Checking end transaction Checking $0

Logging Basics Transactions Bank Transfer Example. Safe / Transactionally Sound Example: Log Entry Savings Before: $3,000 Checking Before: $0 Savings After: $2,000 Checking After: $1,000 Savings Process: start transaction Remove $1,000 From Savings Add $1,000 To Checking $3,000 $0 end transaction Checking

Logging Basics Transactions / Transaction Logs Purpose: Ensure Data Accuracy. What they Record: Before/After values logged to log file. Recovery Process can use log file entries to ensure data validity. ACID (Atomicity, Consistency, Isolation, Durability) Logging Helps allow SQL Server to do EVERYTHING in memory. Memory is exponentially faster than disk. Data not in Memory is ALWAYS loaded from disk to Memory. Data is moved to/from disk/memory in 8KB Pages. SQL Server tries to keep data in memory as much as possible. Pages with modified data/rows/content = Dirty Pages. Benefits Transactional Safety/Accuracy AND Performance

SQL Server Log Files

Recovery Options Recovery Options: Full Transaction log details kept until log file backup. Simple Transaction log details purged at checkpoint Only useful when you DO NOT care about change-bychange recovery/rollbacks. Bulk-logged Behaves just like FULL recovery. More compact logging information. (Slightly less protection in the case of disaster in exchange for decreased disk use.)

RESTORE versus RECOVERY RESTORE MEDIA or data in your.mdf/.ndf Data Files RECOVERY TRANSACTIONS or operations you want to replay against data in your files. DISASTER RECOVERY ORDER OF OPERATIONS First: Restore your MEDIA get data into position/shape. Second: REPLAY transactions from the Log File to RECOVER to the point in time needed.

Backup Types and Coverage Two Primary Backup Types MEDIA (data) Backups: Full Backups Differential Backups (Data) File Backups (NONE OF THESE BACKUP TRANSACTION LOGS) TRANSACTION LOG Backups ONLY backs up Transaction Logs

How To: Backup, Restore, and Recover Backups Can be done via Script, or via GUI (SSMS). Restore/Recovery Can be done via Script or via GUI. Confidence Not the same as Comfort or Familiarity. You HAVE to get hands-on-practice with these techniques. Period.

Other Considerations (OR: stuff we don t have time for that s still important) Database Corruption 99.99%+ attributable to IO subsystem SQL Server is able to easily detect corruption. See Books Online for DBCC CHECKDB() Formalizing Disaster Recovery Solutions Documentation of DR proceedings Communication of DR concerns/goals to management: RTOs (Recovery Time Objectives) RPOs (Recovery Point Objectives)

The Role of Redundancy Storage of Backups Local. Faster recovery times (no network overhead). Off-box. Creates redundancy. Redundancy is Critical to Avoiding Disaster High Availability (HA) Solutions: Clustering Mirroring Log Shipping SQL Server Denali s Always On (Denali = next version of SQL Server. (SQL Server 2011?))

HA Best Practices Test Regularly Documentation Failover procedures Escalation details Failback considerations (what to do after disaster has been addressed). Environment HA / DR is more than just data. Make sure you account for security/environment

Conclusion Additional Resources and help listed on my blog: http://updates.sqlservervideos.com/ Confidence and Disaster Recovery Comfort and Familiarity aren t the same as Confidence There s no Substitute for Hands-on Practice Regular Testing: Builds your Skill-Level and Confidence Ensures that your solution isn t silently failing