Partial Database Availability High Availability Partial Database Availability 28.11.2015
We would like to thank our Sponsors!
About me 10+ years experience with SQL Server Consultant Trainer telecommunication banking transportation Trainer Contact email: janos@iamberke.com Twitter: @JanosBerke
Agenda What does RPO/RTO mean? What HA/BC options are there? What is a database? What is a database file? What is a filegroup? Bringing them together – Database, Filegroup, File Demo: creating a database with multiple files and filegroups Restore scenarios Disaster happens Demo: Online piecemeal restore Additional materials/readings
What does RPO/RTO mean? RPO: Recovery Point Objective What a customer wants is 0 What a DBA wants is >0 Plan backup strategy RTO: Recovery Time Objective Define/document restore steps Define/document case scenarios + script them! Practice, practice, practice!
What HA/BC options are there? There are many different options in SQL Server like: Log Shipping Database Mirroring (Deprecated ) Failover Cluster Instance (FCI) Availability Groups (2012 or later version) Partial Database Availability
What is a database? Containers Tables Views Procedures Functions Users Roles Schemas Boundaries Security Accounts Permissions Default collation Backed by Files Data files Log files Organized in filegroups
What is a database file? Every database has: a primary data file: it contains the startup information for the database and points to the other files in the database. Recommended extension is mdf. optionally one or more secondary data file: it contains user-defind data. Recommended extension is ndf. a transaction log file: it holds the log information that is used to recover the database. There must be at least one log file for each database. Recommended extension is ldf.
What is a filegroup? Filegroup is a logical container for data files: group data files together for administrative, data allocation, and placement purposes. Every database has: a PRIMARY filegroup: contains the primary file. All system tables are allocated to the primary filegroup. optionally additional user-defined filegroup(s)
Bringing them together – Database, Filegroup, File PRIMARY FG1 FGn File1.mdf File3.ndf FileN.ndf File2.ndf File4.ndf FileM.ndf FileX.ndf FileY.ndf FileZ.ndf Transaction log Log1.ldf logN.ldf
Demo device Original idea from Kimberly L.Tripp’s SQL MCM Readiness videos It is *NOT* production ready!!!
Demo Creating a database with multiple files and filegroups
MultiFG Database PRIMARY FG1 FG2 MultiFG_Data – C:\ FG1_Data1 – E:\ FG2_Data1 – G:\ FG1_Data2 – F:\ FG2_Data2 – H:\ Transaction log MultiFG_Log – C:\
Restore scenarios Piecemeal restore can be: Depends on : offline online Depends on : Recover models: full recovery model simple recovery model SQL Server edtion: Enterprise not Enterprise (Standard, Web, Express)
Disaster happens PRIMARY FG1 FG2 MultiFG_Data – C:\ FG1_Data1 – E:\ FG2_Data1 – G:\ FG1_Data2 – F:\ FG2_Data2 – H:\ Transaction log MultiFG_Log – C:\
Demo online partial restore with Enterprise Editon + full recovery model
Additional materials/readings SQL Server 2008 Microsoft Certified Master (MCM) Readiness Videos – Partial Database Availability & Online Piecemeal Restore: http://technet.microsoft.com/en-US/sqlserver/gg545009.aspx Piecemeal Restores: http://msdn.microsoft.com/en-us/library/ms177425.aspx Piecemeal Restore of Databases With Memory-Optimized Tables: http://msdn.microsoft.com/en-us/library/dn387567.aspx
We would like to thank our Sponsors!