HYPER-V AND SQL ADMINISTRATION Presented by: Kevin Brunson Chief Technology Officer.

41
HYPER-V AND SQL ADMINISTRATION Presented by: Kevin Brunson Chief Technology Officer

Transcript of HYPER-V AND SQL ADMINISTRATION Presented by: Kevin Brunson Chief Technology Officer.

SERVER VIRTUALIZATION WITH MICROSOFT HYPER-V Virtualization on a Church Budget

Hyper-V and SQL AdministrationPresented by: Kevin BrunsonChief Technology Officer

1What We Will DiscussMicrosoft Hyper-V What is it?Common Tasks Demo: How-ToEnable ReplicationFailover a VMEnable Live MigrationGotchasWhat We Will DiscussWindows 2016 Hyper-V Crystal BallWhat do we know?Confirmed in Technical PreviewWhat do we think?Discussed by Microsoft

What We Will DiscussSQL AdministrationSQL Physical DB Architecture ReviewSQL Recovery ModelsSQL Backups/Maintenance PlansTips/Tricks/Regular TasksWhy The Broad Range of TopicsI couldnt make up my mindI dont want to rehash the same thing over and overJason Powell said Do it allHyper-V in a Nutshell

Host/Guest ModelHost ServerWindows installed on hardware like traditional OSRuns Hyper-Visor softwareGuest ServerWindows installed on software masquerading as hardwareRuns applications

Common TasksReplication/FailoverLive Migration

Go and Do LikewiseHyper-V Replication ConceptsHow does it work?Server configuration replicated onceDrives replicated on a regular basisFailover/Failback

How much bandwidth does it take?I hate to answer a question with a questionHow much data are you trying to keep replicated?How fast does it change?Web Server Probably doesnt change muchExchange Server Probably changes a lot

Hyper-V Replication ConceptsWhat is it for?Very fast recovery of server failureSite redundancy if you have the bandwidth

What is it not for?BackupsDemonstration Live MigrationLets Move a Server With No DowntimeA few things to noticeHyper-V doesnt compress the drive contents when performing a Live Migration, so it takes longer than ReplicationYou cant Live Migrate a server if the server has already been replicated to the destination hostYou will need to make some changes to Active Directory before Live Migration will work correctly

DEMO

Demonstration - ReplicationLets Enable ReplicationA few things to noticeHyper-V compresses the contents of the disks as they traverse the network.Once the system is replicated, you can change settings on the primary system and it wont update the replica.

DEMO

Demonstration - FailoverNow Lets Failover a ServerA few things to noticeFailover requires more than just starting the server, but not muchA Planned Failover is graceful and resyncs changes before it completes. An Unplanned Failover is not graceful and assumes the data on the old server is worthless.

DEMO

GotchasCheck replication health on a regular basisDomain controllers are not good candidates for replicationWhats Coming?Features in Technical PreviewFeatures Rumored for Final Release

Hyper-V In The FutureFeatures that Improve AdministrationAlmost instant VHDX creation, even for Fixed Size DisksFixed size VHDX in less than 5 seconds, no matter the sizeAdd/Remove RAM on a running VM, even if youre not using Dynamic MemoryAdd/Remove Network Adapters on a running VMIntegration Services drivers deployed via Windows UpdatePowershell Direct100GB in 2:53 is about 1.73 seconds per GB. 500GB is about 15 minutes. These numbers were from really fast hardware.16Features that ImproveSecurity or ReliabilityNano92% fewer critical bulletins, 80% fewer rebootsVM Checkpoints use VSS technology in the VM instead of Saved StatesApplication consistent snapshotsShielded VMsBitlocker encrypted VHDX, virtual TPMHost Administrator can have limited or no access to VM

Features that We May or May Not SeeNested VirtualizationMicrosoft says it will be there at releaseNot supported in TP3Why does it matter?GUI out of the boxTP2 required you to enable GUI after installTP3 gives an install option during OS loadWhere will they end up?

A Short Biblical StudyOne of the most commonly used names of God in the Old Testament, used almost 300 times, is Jehovah Sabaoth, which meansLord of Hosts. God Is The Ultimate VirtAdmin

Reset and a PrayerPrayer of the Broken VM

Psalm 80:19 (ESV)Restore us, O Lord God of hosts!Let your face shine, that we may be saved! Now the Awkward Transition

SQL Physical DB Architecture ReviewSQL Recovery ModelsSQL Backups/Maintenance PlansTips/Tricks/Regular TasksSQL FundamentalsSQL Database FilesSQL Databases are composed of at least 2 filesMDF - Contains schema and dataLDF - Contains a history of changes made to the database

Both are required for a database to function

Database Recovery ModelsFullAll transactions recorded in transaction logSimpleSystem reclaims log space as necessaryBulk-loggedUses minimal logging for bulk transactions

Full Recovery ModelAllows point-in-time restoresLDF file growth can become a problem without proper maintenanceRestore process is more complicatedGreatest system resource overhead

Simple Recovery ModelCan be restored only to time of last full backupLDF file remains smallRestore process is simpleSmallest system resource overhead

Bulk-logged Recovery ModelNot point-in-time, but can be restored to time of last backupLDF file remains smaller than Full RecoveryNot recommended for production systemsThat will be the last time we mention Bulk-logged

Backup TypesFull BackupComplete copy of your databaseIncludes MDF and LDF

Transaction Log BackupDump of the database transaction logContains all changes to the database since the last log backup

Full BackupRestorable by itself or as part of a point-in-time restore processCan function as the start of a transaction log chain for point-in-time restores

Transaction Log BackupUsed only for point-in-time restoresUsed only for Full Recovery databasesMust be used in conjunction with a full backupEntire transaction log chain must be present

What Happens When?Full BackupMakes no changes to the databaseTransaction Log BackupMarks transaction log as overwriteableA large LDF file will still be large, but it will be essentially emptyWont grow again until the file fills up

Walk Through The Backup LifecycleFirst Full Backup Allows DB to start loggingTransaction Log Backup startsSQL dumps contents of log to backup locationSQL marks log as not neededSQL starts overwriting logServer runs out of spaceSQL stops servicing

Backup ConsiderationsBackup CompressionSQL 2008 Enterprise2008 R2, 2012, 2014, Standard and EnterpriseConsiderably less disk spaceFaster backup performanceTake the performance hit into consideration when schedulingTransaction Log Backups should occur as often as necessary to meet business requirementsLocal backups dont help if you lose the volume

Why Dont I Have Backups?SQL Express doesnt come with the SQL AgentIf you have Express you will need to run backups another way3rd Party Backup Application (Like Shelby Backup/Restore) for schedulingJobs run via batch file from Scheduled TasksManualYou probably shouldnt use Full Recovery on an Express database

What is SQL Express anyway?SQL Express is designed for small databases with small user countsSQL 2014 Express has the following limits:10GB MDF file size1GB RAM per instance1 socket or 4 coresFor comparison, SQL Standard can use:524PB MDF file size128GB of RAM per instanceThe lesser of 4 sockets or 16 coresOther Key MaintenanceCleanup Delete old files by ageMake sure you take bak and trn into accountShrink Remove unused pages to reduce filesizeIf in Full Recovery, run Transaction Log backup firstRe-index Speed up your DBs by reducing index fragmentationCauses a big spike in Transaction Log sizeWeekly (Or Daily) Tasks for YouCheck Disk SpaceCheck DB Size (MDF and LDF)Agent Job StatusAre Full Backups running?Are Transaction Log Backups running?Are other Maintenance Plans running?Verify that your backups are writing to something else: Tape, Disk, Offsite, External Storage, etc.

Monthly (Or Weekly) Tasks for YouTest RestoreAre your backups actually usable?Windows UpdatesSQL Updates actually fix real problemsCheck DB Size (MDF and LDF)Agent Job StatusAre Full Backups running?Are Transaction Log Backups running?Are other Maintenance Plans running?Verify that your backups are writing to something else: Tape, Disk, Offsite, External Storage, etc.

About the Presenter:Kevin Brunson is the Chief Technology Officer of Higher Ground Technologies in Collierville, TN. He holds a BA degree from Crichton College and a myriad of industry certifications including MCSE. Kevin has been working with church technology since 2000. 40Higher Ground Technologies, Inc exists to serve the unique technology needs of churches nationwide. The company provides network design and consulting services, system integration and a full suite of IT management services for churches wishing to outsource some or all of their technology management. Higher Ground Technologies also provides VoIP communication systems, enterprise wireless networks, secure online backup services, 24x7 network monitoring and support, and high performance, extremely reliable network servers and security devices.

41