SlideShare a Scribd company logo
1 of 52
DBAs Behaving Badly Worst Practices for Database Administrators
About the writer… Rod Colledge Independent SQL Consultant Based in Brisbane, Australia Web; www.sqlCrunch.com Blog; www.rodcolledge.com MVP Deep Dives Book Twitter @rodcolledge linkedin.com/in/rodcolledge
About us…. Dubi Lebel DB”A
About us…. Dubi Lebel DB”A –  Dubi   Behind  All
About us…. Dubi Lebel DB”A –  Dubi   Behind  All D.B.A –
About us…. Dubi Lebel DB”A –  Dubi   Behind  All D.B.A – Don’t  Bother   Asking… Shahar Bar SQL Consultant and CEO at Valinor
Session Overview Disaster Recovery (DR) Planning Backup & Restore Change Control Storage Configuration File Configuration Indexing Administration Techniques
Disaster Recovery (DR) Planning
1 / 20; Not having SLAs SLAs provide context for “everything”. e.g.; Database available 24/7 @ 99.999% uptime Zero data loss Sub-second response time Use option papers during SLA negotiations
SLA Option Papers
2 / 20; Not having/testing DR plans Do you have DR Plans? How do you know your plans will work? “DR fire drills” All/new DBAs trained in recovery procedures? Location of recovery documents & scripts? Documents/scripts up to date?
2 / 20; Not having/testing DR plans
3 / 20; Narrow definition of disaster Types of disasters; Complete environmental destruction Air conditioning failure Disk crash Accidentally dropping a table/database Security breach; what data was accessed? The next disaster will be unanticipated. Are your DR plans pessimistic enough?
Backup & Restore
argh! ... who would have thought we needed backups?
4 / 20; Not Taking Backups Huh? Less obvious variations; File system backups only No transaction log backups SAN Snapshots – Recoverability?
5 / 20; Not Verifying Backups How do you know they worked? Verification options RESTORE VERIFYONLY FROM <backup_device> Restore to a Reporting Server Log shipping (log backup verification)
6 / 20; Designing for Backups only Design for restoration! What is the data loss exposure? How long will the recovery take? Script, test & document various restore scenarios
Backup Compression BACKUP DATABASE AdventureWorks2008 TO DISK =‘G:QL BackupWorks.bak’ WITH COMPRESSION
Change Control
7 / 20; Insufficient Test Environments
8 / 20; No Performance Baseline
9 / 20; No Standard Build/Change Log Without a change log, how can you answer; Why is something different? Who made the change? When was the change made? Was the change successful? What will happen if the change is rolled back?
Policy Based Management
Configuration File.ini
Demo; Configuration Changes Report
Storage Configuration
10 / 20; Capacity-Centric Design 200GB database – How many 73GB disks? Capacity Centric; 200 / 73 = 3 disks Performance Centric (reads per sec + (writes per sec * RAID)) / IOPS (1200 + (400 * 2)) / 125 = 16 disks! ~ 1.1TB or 500GB after RAID
Preface: Many Factors Affect Disk I/O Perf There are myriad best practices & considerations for optimal disk I/O subsystem performance. Be mindful of factors such as:  RAID level File allocation unit size Number, size, & speed of disks Configuration & capacity of HBAs & fabric switches Consider increasing HBA Queue Depth Network bandwidth Cache on disk, controllers, & SAN Whether disks are dedicated, shared, or virtualized Bus speed Number of paths from disk I/O subsystem to server Driver versions for all components Stripe size Stripe unit size Workload
HDD Architecture:  3-D This image is from a contemporary & otherwise excellent document, but it represents disks as they were over two decades ago! The disk deities at Microsoft won’t allow me to perpetrate such myths. Graphics source:  Veritas Storage Foundation™ 5.0 for Windows Best Practices for Storage Management http://eval.symantec.com/mktginfo/enterprise/white_papers/ent-whitepaper_vsfw_5.0_best_practices_for_storage_mgmt_02-2007.en-us.pdf
Partition Alignment Graphic:     NTFS 4KB Cluster: Default vs. Aligned RAID Array     ***This has CONTEMPORARY RELEVANCE*** This is a very simplified graphic Contemporary relevance Corresponds to default NTFS file allocation unit of 4KB Given common 64KB stripe unit size  See the Notes for details Graphics Source:  Jimmy May
Partition Alignment Graphic:      RAID Array: Default vs. Optimized for SQL Server       ***This has CONTEMPORARY RELEVANCE*** This is a very simplified graphic Mark Licata, Senior Technology Architect The worst scenario?  Random operations using 64K IO and 64K chunk size.  One sector off and you are hitting two disks for every IO thus halving the random performance potential.   Note:  On a RAID array this means accessing two different stripe units on two separate disks. Graphics Source:  Jimmy May
11 / 20; Using Unaligned Partitions
Which of the following RAID levels is not a good choice for write-intensive DBs? RAID-0 RAID-1 RAID-5 RAID-10
File Configuration
12 / 20; Relying on Autogrowth
13 / 20; Shrinking Files
14 / 20; Full recovery + no log backups When are records removed from the t-log file? Full recovery model; ONLY after t-log backup Simple recovery model; On checkpoint When to use full recovery model? When point in time recovery is required Backup the log file! Take care when moving DBs from/to production
Indexing
15 / 20; Too many/not enough indexes Small dev db  production (not enough) Loaded with unused indexes (too many) Watch for duplicate or overlapping indexes DMV’s to the rescue sys.dm_db_missing_index_% sys.dm_db_index_usage_stats sys.dm_db_index_physical_stats
Demo; Indexing
16 / 20; Inappropriate index maintenance Code in Books Online: sys.dm_db_index_physical_stats
17 / 20; Update stats after index rebuild
Administration Techniques
18 / 20; Manual Administration “Automation enables more things to be achieved with fewer mistakes in a given amount of time”
19 / 20; Not defining alerts Manage by exception SQL Agent Alerts; Job failures Performance conditions High severity errors (level 19 +) What about error 825 (level 10) ? http://www.karaszi.com/SQLServer/util_agent_alerts.asp
20 / 20; No task lists/check lists
Demo; Administration techniques
Summary Be “cautiously pessimistic” Design backups from a restore perspective Establish & maintain performance baselines Validate the I/O chain Use a performance-centric design Don’t rely on “all” out of the box settings Understand the indexing DMVs Automate & manage by exception
rodcolledge@gmail.comwww.rodcolledge.comwww.sqlcrunch.com
Complete the Evaluation Form & Win! You could win a Dell Mini Netbook – every day – just for handing in your completed form! Each session form is another chance to win! Pick up your Evaluation Form: Within each presentation room At the PASS Booth near registration area Drop off your completed Form: Near the exit of each presentation room At the PASS Booth near registration area Sponsored by Dell
Thank you for attending this session and the 2009 PASS Summit in Seattle

More Related Content

What's hot

12 best practices for virtualizing active directory DCs
12 best practices for virtualizing active directory DCs12 best practices for virtualizing active directory DCs
12 best practices for virtualizing active directory DCsVeeam Software
 
Best Practices For Virtualised Share Point T02 Brendan Law Nathan Mercer
Best Practices For Virtualised Share Point T02 Brendan Law Nathan MercerBest Practices For Virtualised Share Point T02 Brendan Law Nathan Mercer
Best Practices For Virtualised Share Point T02 Brendan Law Nathan MercerFlamer
 
How to achieve better backup with Symantec
How to achieve better backup with SymantecHow to achieve better backup with Symantec
How to achieve better backup with SymantecArrow ECS UK
 
EDB Postgres Failover Manager
EDB Postgres Failover ManagerEDB Postgres Failover Manager
EDB Postgres Failover ManagerEDB
 
Better Backup For All - February 2012
Better Backup For All - February 2012Better Backup For All - February 2012
Better Backup For All - February 2012Symantec
 
Vertica 7.0 Architecture Overview
Vertica 7.0 Architecture OverviewVertica 7.0 Architecture Overview
Vertica 7.0 Architecture OverviewAndrey Karpov
 
Developing Software for Persistent Memory / Willhalm Thomas (Intel)
Developing Software for Persistent Memory / Willhalm Thomas (Intel)Developing Software for Persistent Memory / Willhalm Thomas (Intel)
Developing Software for Persistent Memory / Willhalm Thomas (Intel)Ontico
 
Hardware planning & sizing for sql server
Hardware planning & sizing for sql serverHardware planning & sizing for sql server
Hardware planning & sizing for sql serverDavide Mauri
 
Exploring Windows XP to 7 Migration Options
Exploring Windows XP to 7 Migration OptionsExploring Windows XP to 7 Migration Options
Exploring Windows XP to 7 Migration OptionsDavid Strom
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Jess Coburn
 
Sample Solution Blueprint
Sample Solution BlueprintSample Solution Blueprint
Sample Solution BlueprintMike Alvarado
 
EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB
 
Best practices: running high-performance databases on Kubernetes
Best practices: running high-performance databases on KubernetesBest practices: running high-performance databases on Kubernetes
Best practices: running high-performance databases on KubernetesMariaDB plc
 
Denver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationDenver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationKyle Hailey
 
Best Practices For Optimizing DB2 Performance Final
Best Practices For Optimizing DB2 Performance FinalBest Practices For Optimizing DB2 Performance Final
Best Practices For Optimizing DB2 Performance FinalDatavail
 
Dueling duplications RMAN vs Delphix
Dueling duplications RMAN vs DelphixDueling duplications RMAN vs Delphix
Dueling duplications RMAN vs DelphixKyle Hailey
 
How to run Real Time processing on Big Data / Ron Zavner (GigaSpaces)
How to run Real Time processing on Big Data / Ron Zavner (GigaSpaces)How to run Real Time processing on Big Data / Ron Zavner (GigaSpaces)
How to run Real Time processing on Big Data / Ron Zavner (GigaSpaces)Ontico
 

What's hot (20)

12 best practices for virtualizing active directory DCs
12 best practices for virtualizing active directory DCs12 best practices for virtualizing active directory DCs
12 best practices for virtualizing active directory DCs
 
Best Practices For Virtualised Share Point T02 Brendan Law Nathan Mercer
Best Practices For Virtualised Share Point T02 Brendan Law Nathan MercerBest Practices For Virtualised Share Point T02 Brendan Law Nathan Mercer
Best Practices For Virtualised Share Point T02 Brendan Law Nathan Mercer
 
How to achieve better backup with Symantec
How to achieve better backup with SymantecHow to achieve better backup with Symantec
How to achieve better backup with Symantec
 
EDB Postgres Failover Manager
EDB Postgres Failover ManagerEDB Postgres Failover Manager
EDB Postgres Failover Manager
 
Better Backup For All - February 2012
Better Backup For All - February 2012Better Backup For All - February 2012
Better Backup For All - February 2012
 
Vertica 7.0 Architecture Overview
Vertica 7.0 Architecture OverviewVertica 7.0 Architecture Overview
Vertica 7.0 Architecture Overview
 
Developing Software for Persistent Memory / Willhalm Thomas (Intel)
Developing Software for Persistent Memory / Willhalm Thomas (Intel)Developing Software for Persistent Memory / Willhalm Thomas (Intel)
Developing Software for Persistent Memory / Willhalm Thomas (Intel)
 
Hardware planning & sizing for sql server
Hardware planning & sizing for sql serverHardware planning & sizing for sql server
Hardware planning & sizing for sql server
 
Exploring Windows XP to 7 Migration Options
Exploring Windows XP to 7 Migration OptionsExploring Windows XP to 7 Migration Options
Exploring Windows XP to 7 Migration Options
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11
 
Delphix
DelphixDelphix
Delphix
 
Sample Solution Blueprint
Sample Solution BlueprintSample Solution Blueprint
Sample Solution Blueprint
 
5 Things to Ask Your Virtualization Administrator
5 Things to Ask Your Virtualization Administrator5 Things to Ask Your Virtualization Administrator
5 Things to Ask Your Virtualization Administrator
 
EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best Practices
 
Best practices: running high-performance databases on Kubernetes
Best practices: running high-performance databases on KubernetesBest practices: running high-performance databases on Kubernetes
Best practices: running high-performance databases on Kubernetes
 
Denver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationDenver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualization
 
VDI Design Guide
VDI Design GuideVDI Design Guide
VDI Design Guide
 
Best Practices For Optimizing DB2 Performance Final
Best Practices For Optimizing DB2 Performance FinalBest Practices For Optimizing DB2 Performance Final
Best Practices For Optimizing DB2 Performance Final
 
Dueling duplications RMAN vs Delphix
Dueling duplications RMAN vs DelphixDueling duplications RMAN vs Delphix
Dueling duplications RMAN vs Delphix
 
How to run Real Time processing on Big Data / Ron Zavner (GigaSpaces)
How to run Real Time processing on Big Data / Ron Zavner (GigaSpaces)How to run Real Time processing on Big Data / Ron Zavner (GigaSpaces)
How to run Real Time processing on Big Data / Ron Zavner (GigaSpaces)
 

Similar to Db As Behaving Badly... Worst Practices For Database Administrators Rod Colledge

SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availabilityPeter Gfader
 
Large Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint DeploymentsLarge Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint DeploymentsJoel Oleson
 
Denver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierDenver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierKellyn Pot'Vin-Gorman
 
Sql Server tips from the field
Sql Server tips from the fieldSql Server tips from the field
Sql Server tips from the fieldInnoTech
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentJean-François Gagné
 
Guob consolidation implementation11gr2
Guob consolidation implementation11gr2Guob consolidation implementation11gr2
Guob consolidation implementation11gr2Rodrigo Almeida
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersTobias Koprowski
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersTobias Koprowski
 
Designing For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps SlideshareDesigning For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps SlideshareDean Willson
 
2007-05-23 Cecchet_PGCon2007.ppt
2007-05-23 Cecchet_PGCon2007.ppt2007-05-23 Cecchet_PGCon2007.ppt
2007-05-23 Cecchet_PGCon2007.pptnadirpervez2
 
DBA, LEVEL III TTLM Monitoring and Administering Database.docx
DBA, LEVEL III TTLM Monitoring and Administering Database.docxDBA, LEVEL III TTLM Monitoring and Administering Database.docx
DBA, LEVEL III TTLM Monitoring and Administering Database.docxseifusisay06
 
Tips for managing a VLDB
Tips for managing a VLDBTips for managing a VLDB
Tips for managing a VLDBJohn Martin
 
Management and Automation of MongoDB Clusters - Slides
Management and Automation of MongoDB Clusters - SlidesManagement and Automation of MongoDB Clusters - Slides
Management and Automation of MongoDB Clusters - SlidesSeveralnines
 
VMUGIT UC 2013 - 04 Duncan Epping
VMUGIT UC 2013 - 04 Duncan EppingVMUGIT UC 2013 - 04 Duncan Epping
VMUGIT UC 2013 - 04 Duncan EppingVMUG IT
 
7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptx7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptxScyllaDB
 
download it from here
download it from heredownload it from here
download it from herewebhostingguy
 
Sql Health in a SharePoint environment
Sql Health in a SharePoint environmentSql Health in a SharePoint environment
Sql Health in a SharePoint environmentEnrique Lima
 

Similar to Db As Behaving Badly... Worst Practices For Database Administrators Rod Colledge (20)

SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
 
Large Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint DeploymentsLarge Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint Deployments
 
Denver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierDenver SQL Saturday The Next Frontier
Denver SQL Saturday The Next Frontier
 
Sql Server tips from the field
Sql Server tips from the fieldSql Server tips from the field
Sql Server tips from the field
 
Copy Data Management for the DBA
Copy Data Management for the DBACopy Data Management for the DBA
Copy Data Management for the DBA
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated Environment
 
Guob consolidation implementation11gr2
Guob consolidation implementation11gr2Guob consolidation implementation11gr2
Guob consolidation implementation11gr2
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
 
Designing For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps SlideshareDesigning For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps Slideshare
 
2007-05-23 Cecchet_PGCon2007.ppt
2007-05-23 Cecchet_PGCon2007.ppt2007-05-23 Cecchet_PGCon2007.ppt
2007-05-23 Cecchet_PGCon2007.ppt
 
DBA, LEVEL III TTLM Monitoring and Administering Database.docx
DBA, LEVEL III TTLM Monitoring and Administering Database.docxDBA, LEVEL III TTLM Monitoring and Administering Database.docx
DBA, LEVEL III TTLM Monitoring and Administering Database.docx
 
Tips for managing a VLDB
Tips for managing a VLDBTips for managing a VLDB
Tips for managing a VLDB
 
Management and Automation of MongoDB Clusters - Slides
Management and Automation of MongoDB Clusters - SlidesManagement and Automation of MongoDB Clusters - Slides
Management and Automation of MongoDB Clusters - Slides
 
VMUGIT UC 2013 - 04 Duncan Epping
VMUGIT UC 2013 - 04 Duncan EppingVMUGIT UC 2013 - 04 Duncan Epping
VMUGIT UC 2013 - 04 Duncan Epping
 
7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptx7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptx
 
download it from here
download it from heredownload it from here
download it from here
 
SQL Police
SQL PoliceSQL Police
SQL Police
 
Sql Health in a SharePoint environment
Sql Health in a SharePoint environmentSql Health in a SharePoint environment
Sql Health in a SharePoint environment
 
Sql 2005 high availability
Sql 2005 high availabilitySql 2005 high availability
Sql 2005 high availability
 

More from sqlserver.co.il

Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013sqlserver.co.il
 
Things you can find in the plan cache
Things you can find in the plan cacheThings you can find in the plan cache
Things you can find in the plan cachesqlserver.co.il
 
Sql server user group news january 2013
Sql server user group news   january 2013Sql server user group news   january 2013
Sql server user group news january 2013sqlserver.co.il
 
Query handlingbytheserver
Query handlingbytheserverQuery handlingbytheserver
Query handlingbytheserversqlserver.co.il
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012sqlserver.co.il
 
Products.intro.forum version
Products.intro.forum versionProducts.intro.forum version
Products.intro.forum versionsqlserver.co.il
 
SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3sqlserver.co.il
 
SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2sqlserver.co.il
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1sqlserver.co.il
 
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended EventsSQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Eventssqlserver.co.il
 
SQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStoreSQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStoresqlserver.co.il
 
SQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACSQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACsqlserver.co.il
 
SQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: SpatialSQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: Spatialsqlserver.co.il
 
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf FraenkelBi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf Fraenkelsqlserver.co.il
 

More from sqlserver.co.il (20)

Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013
 
Things you can find in the plan cache
Things you can find in the plan cacheThings you can find in the plan cache
Things you can find in the plan cache
 
Sql server user group news january 2013
Sql server user group news   january 2013Sql server user group news   january 2013
Sql server user group news january 2013
 
DAC 2012
DAC 2012DAC 2012
DAC 2012
 
Query handlingbytheserver
Query handlingbytheserverQuery handlingbytheserver
Query handlingbytheserver
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012
 
Products.intro.forum version
Products.intro.forum versionProducts.intro.forum version
Products.intro.forum version
 
SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3
 
SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1
 
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended EventsSQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
 
SQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStoreSQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStore
 
SQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACSQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DAC
 
SQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: SpatialSQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: Spatial
 
מיכאל
מיכאלמיכאל
מיכאל
 
נועם
נועםנועם
נועם
 
עדי
עדיעדי
עדי
 
מיכאל
מיכאלמיכאל
מיכאל
 
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf FraenkelBi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
 
DBCC - Dubi Lebel
DBCC - Dubi LebelDBCC - Dubi Lebel
DBCC - Dubi Lebel
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Db As Behaving Badly... Worst Practices For Database Administrators Rod Colledge

  • 1. DBAs Behaving Badly Worst Practices for Database Administrators
  • 2. About the writer… Rod Colledge Independent SQL Consultant Based in Brisbane, Australia Web; www.sqlCrunch.com Blog; www.rodcolledge.com MVP Deep Dives Book Twitter @rodcolledge linkedin.com/in/rodcolledge
  • 3. About us…. Dubi Lebel DB”A
  • 4. About us…. Dubi Lebel DB”A – Dubi Behind All
  • 5. About us…. Dubi Lebel DB”A – Dubi Behind All D.B.A –
  • 6. About us…. Dubi Lebel DB”A – Dubi Behind All D.B.A – Don’t Bother Asking… Shahar Bar SQL Consultant and CEO at Valinor
  • 7. Session Overview Disaster Recovery (DR) Planning Backup & Restore Change Control Storage Configuration File Configuration Indexing Administration Techniques
  • 9. 1 / 20; Not having SLAs SLAs provide context for “everything”. e.g.; Database available 24/7 @ 99.999% uptime Zero data loss Sub-second response time Use option papers during SLA negotiations
  • 11. 2 / 20; Not having/testing DR plans Do you have DR Plans? How do you know your plans will work? “DR fire drills” All/new DBAs trained in recovery procedures? Location of recovery documents & scripts? Documents/scripts up to date?
  • 12. 2 / 20; Not having/testing DR plans
  • 13. 3 / 20; Narrow definition of disaster Types of disasters; Complete environmental destruction Air conditioning failure Disk crash Accidentally dropping a table/database Security breach; what data was accessed? The next disaster will be unanticipated. Are your DR plans pessimistic enough?
  • 15. argh! ... who would have thought we needed backups?
  • 16. 4 / 20; Not Taking Backups Huh? Less obvious variations; File system backups only No transaction log backups SAN Snapshots – Recoverability?
  • 17. 5 / 20; Not Verifying Backups How do you know they worked? Verification options RESTORE VERIFYONLY FROM <backup_device> Restore to a Reporting Server Log shipping (log backup verification)
  • 18. 6 / 20; Designing for Backups only Design for restoration! What is the data loss exposure? How long will the recovery take? Script, test & document various restore scenarios
  • 19. Backup Compression BACKUP DATABASE AdventureWorks2008 TO DISK =‘G:QL BackupWorks.bak’ WITH COMPRESSION
  • 21. 7 / 20; Insufficient Test Environments
  • 22. 8 / 20; No Performance Baseline
  • 23. 9 / 20; No Standard Build/Change Log Without a change log, how can you answer; Why is something different? Who made the change? When was the change made? Was the change successful? What will happen if the change is rolled back?
  • 28. 10 / 20; Capacity-Centric Design 200GB database – How many 73GB disks? Capacity Centric; 200 / 73 = 3 disks Performance Centric (reads per sec + (writes per sec * RAID)) / IOPS (1200 + (400 * 2)) / 125 = 16 disks! ~ 1.1TB or 500GB after RAID
  • 29. Preface: Many Factors Affect Disk I/O Perf There are myriad best practices & considerations for optimal disk I/O subsystem performance. Be mindful of factors such as: RAID level File allocation unit size Number, size, & speed of disks Configuration & capacity of HBAs & fabric switches Consider increasing HBA Queue Depth Network bandwidth Cache on disk, controllers, & SAN Whether disks are dedicated, shared, or virtualized Bus speed Number of paths from disk I/O subsystem to server Driver versions for all components Stripe size Stripe unit size Workload
  • 30. HDD Architecture: 3-D This image is from a contemporary & otherwise excellent document, but it represents disks as they were over two decades ago! The disk deities at Microsoft won’t allow me to perpetrate such myths. Graphics source: Veritas Storage Foundation™ 5.0 for Windows Best Practices for Storage Management http://eval.symantec.com/mktginfo/enterprise/white_papers/ent-whitepaper_vsfw_5.0_best_practices_for_storage_mgmt_02-2007.en-us.pdf
  • 31. Partition Alignment Graphic: NTFS 4KB Cluster: Default vs. Aligned RAID Array ***This has CONTEMPORARY RELEVANCE*** This is a very simplified graphic Contemporary relevance Corresponds to default NTFS file allocation unit of 4KB Given common 64KB stripe unit size See the Notes for details Graphics Source: Jimmy May
  • 32. Partition Alignment Graphic: RAID Array: Default vs. Optimized for SQL Server ***This has CONTEMPORARY RELEVANCE*** This is a very simplified graphic Mark Licata, Senior Technology Architect The worst scenario? Random operations using 64K IO and 64K chunk size. One sector off and you are hitting two disks for every IO thus halving the random performance potential. Note: On a RAID array this means accessing two different stripe units on two separate disks. Graphics Source: Jimmy May
  • 33. 11 / 20; Using Unaligned Partitions
  • 34. Which of the following RAID levels is not a good choice for write-intensive DBs? RAID-0 RAID-1 RAID-5 RAID-10
  • 36. 12 / 20; Relying on Autogrowth
  • 37. 13 / 20; Shrinking Files
  • 38. 14 / 20; Full recovery + no log backups When are records removed from the t-log file? Full recovery model; ONLY after t-log backup Simple recovery model; On checkpoint When to use full recovery model? When point in time recovery is required Backup the log file! Take care when moving DBs from/to production
  • 40. 15 / 20; Too many/not enough indexes Small dev db  production (not enough) Loaded with unused indexes (too many) Watch for duplicate or overlapping indexes DMV’s to the rescue sys.dm_db_missing_index_% sys.dm_db_index_usage_stats sys.dm_db_index_physical_stats
  • 42. 16 / 20; Inappropriate index maintenance Code in Books Online: sys.dm_db_index_physical_stats
  • 43. 17 / 20; Update stats after index rebuild
  • 45. 18 / 20; Manual Administration “Automation enables more things to be achieved with fewer mistakes in a given amount of time”
  • 46. 19 / 20; Not defining alerts Manage by exception SQL Agent Alerts; Job failures Performance conditions High severity errors (level 19 +) What about error 825 (level 10) ? http://www.karaszi.com/SQLServer/util_agent_alerts.asp
  • 47. 20 / 20; No task lists/check lists
  • 49. Summary Be “cautiously pessimistic” Design backups from a restore perspective Establish & maintain performance baselines Validate the I/O chain Use a performance-centric design Don’t rely on “all” out of the box settings Understand the indexing DMVs Automate & manage by exception
  • 51. Complete the Evaluation Form & Win! You could win a Dell Mini Netbook – every day – just for handing in your completed form! Each session form is another chance to win! Pick up your Evaluation Form: Within each presentation room At the PASS Booth near registration area Drop off your completed Form: Near the exit of each presentation room At the PASS Booth near registration area Sponsored by Dell
  • 52. Thank you for attending this session and the 2009 PASS Summit in Seattle

Editor's Notes

  1. ההתנהגות הרעה שאנחנו נדבר עליה מוגקבלת למנהגים גרועים של DBA, בתחום הדבאות ולא מעבר לזה.הסיפור על הבן