SlideShare a Scribd company logo
1 of 42
Operational Foundation
for the SQL Server DBA
Peter Shore
About Me
▪ SQL Server Database
Administrator – ThirtyOne Gifts
▪ Intentionally Accidental DBA
▪ Over 25 years IT experience
– Server Engineer
– Desktop Engineer
– Network Infrastructure
– Desk side support
▪ President CBusPASS
▪ Co-Organizer SQL Saturday
Columbus
▪ How to find me
– Twitter: @pshore73
– E-mail: pshore73@outlook.com
Background and Foundation
What is Microsoft SQL Server?
▪ SQL Server is Microsoft’s Relational Database Management System
(RDBMS)
▪ Relational database – digital database based on the relational model
proposed by E.F. Codd in 1970*
▪ SQL is ANSI/ISO standard
▪ Transact SQL (T-SQL) Microsoft Adaptation of the standard
▪ *https://en.wikipedia.org/wiki/Relational_database
▪ https://www.techopedia.com/definition/24559/relational-model-database
A.C.I.D.
▪ Atomicity
– No partial changes, all or nothing
– Any part of transaction fails all parts fail
▪ Consistent
– Only valid data is written to the database
– Transactions violating consistency rules will be entirely rolled back
– Completed transaction takes database from one consistent state to another
▪ Isolation
– Multiple simultaneous transactions do not impact each other
– Transactions will not read intermediate data
– Not ordinal just isolated
▪ Durability
– Committed transactions will not be lost
– Backups and transactions logs facilitate restoration regardless of software or hardware failure
SQL Server System Databases
System database Description
master Database Records all the system-level information for an instance of SQL Server.
msdb Database Is used by SQL Server Agent for scheduling alerts and jobs.
model Database
Is used as the template for all databases created on the instance of SQL
Server. Modifications made to the model database, such as database size,
collation, recovery model, and other database options, are applied to any
databases created afterward.
Resource Database
Is a read-only database that contains system objects that are included
with SQL Server. System objects are physically persisted in the Resource
database, but they logically appear in the sys schema of every database.
tempdb Database Is a workspace for holding temporary objects or intermediate result sets.
SQL Server System Databases
▪ Master
– Instance wide metadata
▪ Login accounts
▪ Endpoints
▪ Linked Servers
▪ System Configuration Settings
▪ Existence of other databases
▪ File location for other databases
– Cannot
▪ Add files or file groups
▪ Change collation
▪ Drop database
https://docs.microsoft.com/en-us/sql/relational-
databases/databases/master-database?view=sql-server-2017
▪ MSDB
– Used by SQL Agent
▪ Jobs schedules
▪ Alerts
▪ Maintains backup history
– Cannot
▪ Change collation
▪ Drop database
▪ Mirror
▪ Remove primary file/filegroup
https://docs.microsoft.com/en-us/sql/relational-
databases/databases/msdb-database?view=sql-server-2017
SQL Server System Databases
▪ Model
▪ Template for all new databases
▪ Used if no additional information is
specified in CREATE
▪ Some settings used forTempDB on
startup
▪ Must exist
– Cannot
▪ Change collation
▪ Drop database
▪ Mirror
▪ Remove primary file/filegroup
https://docs.microsoft.com/en-us/sql/relational-
databases/databases/model-database?view=sql-server-2017
▪ Resource
– Not visible in SQL Server
Management Studio (SSMS)
– Read-Only
– Holds all system objects
– Cannot be backed up via SQL
– Backup can be taken as you would a
file
– Should not be moved
https://docs.microsoft.com/en-us/sql/relational-
databases/databases/resource-database?view=sql-server-2017
SQL Server System Databases
▪ TempDB
– Hold temporary objects that are explicitly created
▪ TempTables
▪ Temp Indexes
▪ Temp stored procs
▪ Temp variables
▪ Tables returned in table valued functions or cursors
– Holds internal system objects
▪ Work tables to store intermediate results for spools, cursors, sorts, and temporary
large object (LOB) storage.
▪ Work files for hash join or hash aggregate operations.
▪ Intermediate sort results for operations such as creating or rebuilding indexes (if
SORT_IN_TEMPDB is specified), or certain GROUP BY, ORDER BY, or UNION queries.
SQL Server System Databases
▪ TempDB
– Hold sVersion Stores
▪ Collection of data pages holding data rows required to support features which use row
versioning
▪ Common version store and on-line index build version store
▪ Version stores contain
– Row versions that are generated by data modification transactions in a database that uses
read-committed using row versioning isolation or snapshot isolation transactions.
– Row versions that are generated by data modification transactions for features, such as: online
index operations, Multiple Active Result Sets (MARS), and AFTER triggers.
https://docs.microsoft.com/en-us/sql/relational-databases/databases/tempdb-database?view=sql-server-2017
SQL Server System Databases
▪ TempDB
– Best practices
▪ For every logical processor have one TempDB file up to eight (8)
▪ When logical processor is greater than eight start with eight files
▪ Add files beyond eight if there is contention
▪ Add files in groups of four (4)
▪ Size files equally
▪ Set growth to the same increment
https://support.microsoft.com/en-us/help/2154845/recommendations-to-reduce-allocation-contention-in-sql-server-tempdb-d
Database Files
▪ Data files
– Storage for the data
– Tend to be random access
– Extension MDF or NDF
▪ MDF – Main Data File
▪ NDF – SecoNdary Data File
– MDF is required
– NDF optional
– File Groups
– Zero writing not required
▪ Transaction Log
– ACID compliance
– Sequential Read/Write
– Extension LDF
▪ Log Data File
– Must be zero written on-premises
Pages and Extents
▪ SQL Server data on disk and in RAM is stored in 8KB pages
▪ Pages are managed in extents
– Extents are 8 physically contiguous pages
– Extents are 64KB
– Uniform extents are owned by the same object and only can be used by that
object
– Mixed extents are share by up to 8 objects
https://docs.microsoft.com/en-us/sql/relational-databases/pages-and-extents-architecture-guide?view=sql-server-2017
Virtual Log Files
VLF1
FREE
VLF2
FREE
VLF3
FREE
VLF4
FREE
Virtual Log Files
VLF1
ACTIVE
VLF2
FREE
VLF3
FREE
VLF4
FREE
Virtual Log Files
VLF1
ACTIVE
VLF2
FREE
VLF3
FREE
VLF4
FREE
Transaction 1
Virtual Log Files
VLF1
ACTIVE
VLF2
FREE
VLF3
FREE
VLF4
FREE
Transaction 1 Transaction 2
Virtual Log Files
https://social.technet.microsoft.com/wiki/contents/articles/51379.sql-server-transaction-log-internal-architecture-facts-every-sql-server-
database-professional-should-know.aspx
VLF1
ACTIVE
VLF2
FREE
VLF3
FREE
VLF4
FREE
Transaction 1 Transaction 2 Transaction 3
SQL Agent
▪ SQL Server’s task scheduler
▪ Jobs
– Tasks
▪ TSQL
▪ Command line
▪ SSIS
▪ Maintenance plans
– Schedules
▪ Alerts
– Operators
https://docs.microsoft.com/en-us/sql/ssms/agent/sql-server-agent?view=sql-server-2017
Database Mail
▪ Reliable, Scalable, Secure,
Supportable
▪ Send e-mail from within SQL
Server
https://docs.microsoft.com/en-us/sql/relational-
databases/database-mail/database-mail?view=sql-server-2017
Restore Strategy
Why a recovery strategy?
▪ On-line nature of SQL Server
▪ Focus on RecoveryTime and Recovery Point
▪ RecoveryTime Objective (RTO)
– “How long can we be down?”
– Controlled by the business/application owner
▪ Recovery Point Objective (RPO)
– “How much data can we lose?”
▪ Time not size
– Controlled by the business/application owner
Recovery Models
▪ Simple
– No log backups
– No point in time recovery
– Operations which require log backups cannot be used on databases in Simple
▪ Log Shipping
▪ Availability Groups
▪ Database Mirroring
– Only recover to last full/differential backup
– SQL Server manages log truncation
Recovery Models
▪ Bulk logged
– Requires log backups
– Adjunct to full recovery but permits high performance bulk copy operations
– Most bulk operations are minimally logged and use less disk space
https://docs.microsoft.com/en-us/sql/relational-databases/import-export/prerequisites-for-minimal-logging-in-bulk-import?view=sql-
server-2017
Backup Types
▪ Full
– Complete data backup
– Contains enough of the log to allow for recovery of that data
▪ Differential
– Backup of all data changed since the last FULL backup
▪ Log
– Backup of the transaction log
– Includes all records not previously backed up
▪ Copy Only
– Full backup that does not affect log sequence
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/backup-overview-sql-server?view=sql-server-2017
Backup Types – Keeping Files in Order
▪ Full
– Complete data backup
– Contains enough of the log to allow for recovery of that data
▪ Differential
– Backup of all data changed since the last FULL backup
▪ Log
– Backup of the transaction log
– Includes all records not previously backed up
▪ Copy Only
– Full backup that does not affect log sequence
The How of Backups
▪ Schedule
▪ Maintenance Plans
▪ Roll your own
▪ FreeTools
▪ PaidTools
▪ Who owns backup?
▪ Test Restores
– GivesTiming for restore
– Not done without Integrity Check
Install and Configure
Preparing to install SQL Server
▪ Windows Configuration
– Give SQL Server Engine account permissions
▪ Lock Pages In Memory
▪ PerformVolume Maintenance (Instant File Initialization aka IFI)
– ConfirmTCP Chimney Offload is set to off
▪ Storage Configuration
– Follow vendor documentation for SQL Server
– Allocation Unit Size 64Kb
▪ Service Accounts
– Windows accounts
– Separate for each service & server
▪ VM configuration
– VMware follow document
https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/solutions/sql-server-on-vmware-best-practices-guide.pdf
Beyond Next Next Next
▪ Screenshots
Beyond Next Next Next
▪ Post install configuration
▪ Max Memory
▪ Ad Hoc
▪ MaxDOP
▪ CTP
▪ Alerts
Monitor and Troubleshoot
What to monitor?
▪ CPU
– Overall
– By socket
– By Core
▪ Memory
– Page Life Expectency
– Memory Grants Pending
▪ Disk
– IOPs
– Queue depth
▪ Queries
– Long running
– Blocking
– Deadlocking
– WAITS
▪ Misc.
– Up/Down of server and services
– Job failures
Where to monitor from?
▪ Windows Performance
Counters
– Instance specific
– Grouped by function
– Can be collected
▪ Dynamic ManagementViews
and Dynamic Management
Functions (DMV and DMF)
– Collectively called DMVs
– https://www.sqlskills.com/blogs/gl
enn/category/dmv-queries/
How to monitor?
▪ Build
– Exactly what you want
▪ Details
▪ Reports
– You must maintain
– You must test with new SQL versions
▪ Buy
– Vendor handles the maintaining and version updates
– May or may not give exactly what you want
▪ Hybrid
– Vendor solution primary
– Use DMVs/roll your own process for deeper dive or specific details
Baseline
▪ Shows what normal is
▪ Easy to see anomalies
▪ Easy to see results of changes
▪ Critical for monitoring and tuning
Details on bad things
▪ SQL Server Logs
▪ Windows Event Logs
▪ Extended Events
Addressing Performance
ZEN and the Art of SQL
Maintenance
Maintenance
▪ Backups
▪ Integrity Check
– DBCC CHECKDB
– Explain what it does
– Link to Paul’s article
▪ Index

More Related Content

What's hot

RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)Gustavo Rene Antunez
 
Oracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra PasalapudiOracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra Pasalapudipasalapudi123
 
DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)Gustavo Rene Antunez
 
Overview of oracle database
Overview of oracle databaseOverview of oracle database
Overview of oracle databaseSamar Prasad
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intropasalapudi
 
DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)Gustavo Rene Antunez
 
Oracle RDBMS architecture
Oracle RDBMS architectureOracle RDBMS architecture
Oracle RDBMS architectureMartin Berger
 
My First 100 days with a MySQL DBMS (WP)
My First 100 days with a MySQL DBMS (WP)My First 100 days with a MySQL DBMS (WP)
My First 100 days with a MySQL DBMS (WP)Gustavo Rene Antunez
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesGustavo Rene Antunez
 
An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)Marco Gralike
 
Exploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cExploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cZohar Elkayam
 
How DBAs can garner the power of the Oracle Public Cloud?
How DBAs can garner the  power of the Oracle Public  Cloud?How DBAs can garner the  power of the Oracle Public  Cloud?
How DBAs can garner the power of the Oracle Public Cloud?Gustavo Rene Antunez
 
SQL Server 2012 - FileTables
SQL Server 2012 - FileTables SQL Server 2012 - FileTables
SQL Server 2012 - FileTables Sperasoft
 
Oracle 12c New Features_RAC_slides
Oracle 12c New Features_RAC_slidesOracle 12c New Features_RAC_slides
Oracle 12c New Features_RAC_slidesSaiful
 
Oracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for ConsolidationOracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for ConsolidationYudi Herdiana
 
SQL Server Reporting Services Disaster Recovery Webinar
SQL Server Reporting Services Disaster Recovery WebinarSQL Server Reporting Services Disaster Recovery Webinar
SQL Server Reporting Services Disaster Recovery WebinarDenny Lee
 

What's hot (20)

RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)
 
Oracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra PasalapudiOracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra Pasalapudi
 
Oracle 12c Architecture
Oracle 12c ArchitectureOracle 12c Architecture
Oracle 12c Architecture
 
DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)
 
Overview of oracle database
Overview of oracle databaseOverview of oracle database
Overview of oracle database
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intro
 
Oracle DBA
Oracle DBAOracle DBA
Oracle DBA
 
DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)
 
Oracle RDBMS architecture
Oracle RDBMS architectureOracle RDBMS architecture
Oracle RDBMS architecture
 
My First 100 days with a MySQL DBMS (WP)
My First 100 days with a MySQL DBMS (WP)My First 100 days with a MySQL DBMS (WP)
My First 100 days with a MySQL DBMS (WP)
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databases
 
An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)
 
Oracle 12c
Oracle 12cOracle 12c
Oracle 12c
 
Exploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cExploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12c
 
How DBAs can garner the power of the Oracle Public Cloud?
How DBAs can garner the  power of the Oracle Public  Cloud?How DBAs can garner the  power of the Oracle Public  Cloud?
How DBAs can garner the power of the Oracle Public Cloud?
 
SQL Server 2012 - FileTables
SQL Server 2012 - FileTables SQL Server 2012 - FileTables
SQL Server 2012 - FileTables
 
Oracle 12c New Features_RAC_slides
Oracle 12c New Features_RAC_slidesOracle 12c New Features_RAC_slides
Oracle 12c New Features_RAC_slides
 
Oracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for ConsolidationOracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for Consolidation
 
Oracle 12c - Multitenant Feature
Oracle 12c - Multitenant FeatureOracle 12c - Multitenant Feature
Oracle 12c - Multitenant Feature
 
SQL Server Reporting Services Disaster Recovery Webinar
SQL Server Reporting Services Disaster Recovery WebinarSQL Server Reporting Services Disaster Recovery Webinar
SQL Server Reporting Services Disaster Recovery Webinar
 

Similar to Operational foundation for the sql server dba

SQL-Server Database.pdf
SQL-Server Database.pdfSQL-Server Database.pdf
SQL-Server Database.pdfShehryarSH1
 
SharePoint 2013 on Azure: Your Dedicated Farm in the Cloud
SharePoint 2013 on Azure: Your Dedicated Farm in the CloudSharePoint 2013 on Azure: Your Dedicated Farm in the Cloud
SharePoint 2013 on Azure: Your Dedicated Farm in the CloudJamie McAllister
 
PostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLPostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLAlexei Krasner
 
Optimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointOptimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointserge luca
 
ASE Performance and Tuning Parameters Beyond the cfg File
ASE Performance and Tuning Parameters Beyond the cfg FileASE Performance and Tuning Parameters Beyond the cfg File
ASE Performance and Tuning Parameters Beyond the cfg FileSAP Technology
 
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software Webcast
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software WebcastPreparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software Webcast
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software WebcastJoel Oleson
 
Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]shuwutong
 
9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdfsreedb2
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16Sanjay Manwani
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under controlMarcin Przepiórowski
 
SharePoint 2010 database maintenance
SharePoint 2010 database maintenanceSharePoint 2010 database maintenance
SharePoint 2010 database maintenanceMatt Ranlett
 
Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Performance Tuning Corporation
 
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Knut Relbe-Moe [MVP, MCT]
 
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux AdminsLinuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux AdminsDave Stokes
 
AUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePointAUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePointMichael Noel
 
Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux AdministratorsProper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux AdministratorsDave Stokes
 
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...Dave Stokes
 

Similar to Operational foundation for the sql server dba (20)

SQL-Server Database.pdf
SQL-Server Database.pdfSQL-Server Database.pdf
SQL-Server Database.pdf
 
Oracle administration classes in mumbai
Oracle administration classes in mumbaiOracle administration classes in mumbai
Oracle administration classes in mumbai
 
SharePoint 2013 on Azure: Your Dedicated Farm in the Cloud
SharePoint 2013 on Azure: Your Dedicated Farm in the CloudSharePoint 2013 on Azure: Your Dedicated Farm in the Cloud
SharePoint 2013 on Azure: Your Dedicated Farm in the Cloud
 
PostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLPostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQL
 
Optimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointOptimize SQL server performance for SharePoint
Optimize SQL server performance for SharePoint
 
ASE Performance and Tuning Parameters Beyond the cfg File
ASE Performance and Tuning Parameters Beyond the cfg FileASE Performance and Tuning Parameters Beyond the cfg File
ASE Performance and Tuning Parameters Beyond the cfg File
 
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software Webcast
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software WebcastPreparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software Webcast
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software Webcast
 
Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]
 
9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf
 
Sql Server
Sql ServerSql Server
Sql Server
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
 
Optimizing SQL Server 2012 for SharePoint 2013
Optimizing SQL Server 2012 for SharePoint 2013Optimizing SQL Server 2012 for SharePoint 2013
Optimizing SQL Server 2012 for SharePoint 2013
 
SharePoint 2010 database maintenance
SharePoint 2010 database maintenanceSharePoint 2010 database maintenance
SharePoint 2010 database maintenance
 
Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?
 
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
 
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux AdminsLinuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
 
AUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePointAUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePoint
 
Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux AdministratorsProper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
 
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
 

Recently uploaded

Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationBoston Institute of Analytics
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 

Recently uploaded (20)

Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health Classification
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 

Operational foundation for the sql server dba

  • 1. Operational Foundation for the SQL Server DBA Peter Shore
  • 2. About Me ▪ SQL Server Database Administrator – ThirtyOne Gifts ▪ Intentionally Accidental DBA ▪ Over 25 years IT experience – Server Engineer – Desktop Engineer – Network Infrastructure – Desk side support ▪ President CBusPASS ▪ Co-Organizer SQL Saturday Columbus ▪ How to find me – Twitter: @pshore73 – E-mail: pshore73@outlook.com
  • 4. What is Microsoft SQL Server? ▪ SQL Server is Microsoft’s Relational Database Management System (RDBMS) ▪ Relational database – digital database based on the relational model proposed by E.F. Codd in 1970* ▪ SQL is ANSI/ISO standard ▪ Transact SQL (T-SQL) Microsoft Adaptation of the standard ▪ *https://en.wikipedia.org/wiki/Relational_database ▪ https://www.techopedia.com/definition/24559/relational-model-database
  • 5. A.C.I.D. ▪ Atomicity – No partial changes, all or nothing – Any part of transaction fails all parts fail ▪ Consistent – Only valid data is written to the database – Transactions violating consistency rules will be entirely rolled back – Completed transaction takes database from one consistent state to another ▪ Isolation – Multiple simultaneous transactions do not impact each other – Transactions will not read intermediate data – Not ordinal just isolated ▪ Durability – Committed transactions will not be lost – Backups and transactions logs facilitate restoration regardless of software or hardware failure
  • 6. SQL Server System Databases System database Description master Database Records all the system-level information for an instance of SQL Server. msdb Database Is used by SQL Server Agent for scheduling alerts and jobs. model Database Is used as the template for all databases created on the instance of SQL Server. Modifications made to the model database, such as database size, collation, recovery model, and other database options, are applied to any databases created afterward. Resource Database Is a read-only database that contains system objects that are included with SQL Server. System objects are physically persisted in the Resource database, but they logically appear in the sys schema of every database. tempdb Database Is a workspace for holding temporary objects or intermediate result sets.
  • 7. SQL Server System Databases ▪ Master – Instance wide metadata ▪ Login accounts ▪ Endpoints ▪ Linked Servers ▪ System Configuration Settings ▪ Existence of other databases ▪ File location for other databases – Cannot ▪ Add files or file groups ▪ Change collation ▪ Drop database https://docs.microsoft.com/en-us/sql/relational- databases/databases/master-database?view=sql-server-2017 ▪ MSDB – Used by SQL Agent ▪ Jobs schedules ▪ Alerts ▪ Maintains backup history – Cannot ▪ Change collation ▪ Drop database ▪ Mirror ▪ Remove primary file/filegroup https://docs.microsoft.com/en-us/sql/relational- databases/databases/msdb-database?view=sql-server-2017
  • 8. SQL Server System Databases ▪ Model ▪ Template for all new databases ▪ Used if no additional information is specified in CREATE ▪ Some settings used forTempDB on startup ▪ Must exist – Cannot ▪ Change collation ▪ Drop database ▪ Mirror ▪ Remove primary file/filegroup https://docs.microsoft.com/en-us/sql/relational- databases/databases/model-database?view=sql-server-2017 ▪ Resource – Not visible in SQL Server Management Studio (SSMS) – Read-Only – Holds all system objects – Cannot be backed up via SQL – Backup can be taken as you would a file – Should not be moved https://docs.microsoft.com/en-us/sql/relational- databases/databases/resource-database?view=sql-server-2017
  • 9. SQL Server System Databases ▪ TempDB – Hold temporary objects that are explicitly created ▪ TempTables ▪ Temp Indexes ▪ Temp stored procs ▪ Temp variables ▪ Tables returned in table valued functions or cursors – Holds internal system objects ▪ Work tables to store intermediate results for spools, cursors, sorts, and temporary large object (LOB) storage. ▪ Work files for hash join or hash aggregate operations. ▪ Intermediate sort results for operations such as creating or rebuilding indexes (if SORT_IN_TEMPDB is specified), or certain GROUP BY, ORDER BY, or UNION queries.
  • 10. SQL Server System Databases ▪ TempDB – Hold sVersion Stores ▪ Collection of data pages holding data rows required to support features which use row versioning ▪ Common version store and on-line index build version store ▪ Version stores contain – Row versions that are generated by data modification transactions in a database that uses read-committed using row versioning isolation or snapshot isolation transactions. – Row versions that are generated by data modification transactions for features, such as: online index operations, Multiple Active Result Sets (MARS), and AFTER triggers. https://docs.microsoft.com/en-us/sql/relational-databases/databases/tempdb-database?view=sql-server-2017
  • 11. SQL Server System Databases ▪ TempDB – Best practices ▪ For every logical processor have one TempDB file up to eight (8) ▪ When logical processor is greater than eight start with eight files ▪ Add files beyond eight if there is contention ▪ Add files in groups of four (4) ▪ Size files equally ▪ Set growth to the same increment https://support.microsoft.com/en-us/help/2154845/recommendations-to-reduce-allocation-contention-in-sql-server-tempdb-d
  • 12. Database Files ▪ Data files – Storage for the data – Tend to be random access – Extension MDF or NDF ▪ MDF – Main Data File ▪ NDF – SecoNdary Data File – MDF is required – NDF optional – File Groups – Zero writing not required ▪ Transaction Log – ACID compliance – Sequential Read/Write – Extension LDF ▪ Log Data File – Must be zero written on-premises
  • 13. Pages and Extents ▪ SQL Server data on disk and in RAM is stored in 8KB pages ▪ Pages are managed in extents – Extents are 8 physically contiguous pages – Extents are 64KB – Uniform extents are owned by the same object and only can be used by that object – Mixed extents are share by up to 8 objects https://docs.microsoft.com/en-us/sql/relational-databases/pages-and-extents-architecture-guide?view=sql-server-2017
  • 14.
  • 20. SQL Agent ▪ SQL Server’s task scheduler ▪ Jobs – Tasks ▪ TSQL ▪ Command line ▪ SSIS ▪ Maintenance plans – Schedules ▪ Alerts – Operators https://docs.microsoft.com/en-us/sql/ssms/agent/sql-server-agent?view=sql-server-2017
  • 21. Database Mail ▪ Reliable, Scalable, Secure, Supportable ▪ Send e-mail from within SQL Server https://docs.microsoft.com/en-us/sql/relational- databases/database-mail/database-mail?view=sql-server-2017
  • 23. Why a recovery strategy? ▪ On-line nature of SQL Server ▪ Focus on RecoveryTime and Recovery Point ▪ RecoveryTime Objective (RTO) – “How long can we be down?” – Controlled by the business/application owner ▪ Recovery Point Objective (RPO) – “How much data can we lose?” ▪ Time not size – Controlled by the business/application owner
  • 24. Recovery Models ▪ Simple – No log backups – No point in time recovery – Operations which require log backups cannot be used on databases in Simple ▪ Log Shipping ▪ Availability Groups ▪ Database Mirroring – Only recover to last full/differential backup – SQL Server manages log truncation
  • 25. Recovery Models ▪ Bulk logged – Requires log backups – Adjunct to full recovery but permits high performance bulk copy operations – Most bulk operations are minimally logged and use less disk space https://docs.microsoft.com/en-us/sql/relational-databases/import-export/prerequisites-for-minimal-logging-in-bulk-import?view=sql- server-2017
  • 26. Backup Types ▪ Full – Complete data backup – Contains enough of the log to allow for recovery of that data ▪ Differential – Backup of all data changed since the last FULL backup ▪ Log – Backup of the transaction log – Includes all records not previously backed up ▪ Copy Only – Full backup that does not affect log sequence https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/backup-overview-sql-server?view=sql-server-2017
  • 27. Backup Types – Keeping Files in Order ▪ Full – Complete data backup – Contains enough of the log to allow for recovery of that data ▪ Differential – Backup of all data changed since the last FULL backup ▪ Log – Backup of the transaction log – Includes all records not previously backed up ▪ Copy Only – Full backup that does not affect log sequence
  • 28. The How of Backups ▪ Schedule ▪ Maintenance Plans ▪ Roll your own ▪ FreeTools ▪ PaidTools ▪ Who owns backup? ▪ Test Restores – GivesTiming for restore – Not done without Integrity Check
  • 30. Preparing to install SQL Server ▪ Windows Configuration – Give SQL Server Engine account permissions ▪ Lock Pages In Memory ▪ PerformVolume Maintenance (Instant File Initialization aka IFI) – ConfirmTCP Chimney Offload is set to off ▪ Storage Configuration – Follow vendor documentation for SQL Server – Allocation Unit Size 64Kb ▪ Service Accounts – Windows accounts – Separate for each service & server ▪ VM configuration – VMware follow document https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/solutions/sql-server-on-vmware-best-practices-guide.pdf
  • 31. Beyond Next Next Next ▪ Screenshots
  • 32. Beyond Next Next Next ▪ Post install configuration ▪ Max Memory ▪ Ad Hoc ▪ MaxDOP ▪ CTP ▪ Alerts
  • 34. What to monitor? ▪ CPU – Overall – By socket – By Core ▪ Memory – Page Life Expectency – Memory Grants Pending ▪ Disk – IOPs – Queue depth ▪ Queries – Long running – Blocking – Deadlocking – WAITS ▪ Misc. – Up/Down of server and services – Job failures
  • 35. Where to monitor from? ▪ Windows Performance Counters – Instance specific – Grouped by function – Can be collected ▪ Dynamic ManagementViews and Dynamic Management Functions (DMV and DMF) – Collectively called DMVs – https://www.sqlskills.com/blogs/gl enn/category/dmv-queries/
  • 36. How to monitor? ▪ Build – Exactly what you want ▪ Details ▪ Reports – You must maintain – You must test with new SQL versions ▪ Buy – Vendor handles the maintaining and version updates – May or may not give exactly what you want ▪ Hybrid – Vendor solution primary – Use DMVs/roll your own process for deeper dive or specific details
  • 37. Baseline ▪ Shows what normal is ▪ Easy to see anomalies ▪ Easy to see results of changes ▪ Critical for monitoring and tuning
  • 38. Details on bad things ▪ SQL Server Logs ▪ Windows Event Logs ▪ Extended Events
  • 39.
  • 41. ZEN and the Art of SQL Maintenance
  • 42. Maintenance ▪ Backups ▪ Integrity Check – DBCC CHECKDB – Explain what it does – Link to Paul’s article ▪ Index