SlideShare a Scribd company logo
Collective Imagination 2021 is a Gallery Systems Event
A CRASH COURSE IN SQL SERVER ADMINISTRATION
FOR RELUCTANT DATABASE ADMINISTRATORS
Chad Petrovay, TMS Administrator, The Morgan Library & Museum
Collective Imagination 2021 is a Gallery Systems Event
Reluctant DBAs are those of us who haven't
had formal training in administering a
database and are surviving on a
combination of our wits, Books Online
(BOL), and technical manuals.
- Josef Finsel
Collective Imagination 2021 is a Gallery Systems Event
THE RELUCTANT DBA
•The goal is NOT perfection
•The goal is a stable, reliable
database server
Collective Imagination 2021 is a Gallery Systems Event
WHAT IS SQL SERVER?
TMS
(Database)
Physical Server
(Hardware/OS)
Database Engine
(Software)
Collective Imagination 2021 is a Gallery Systems Event
SERVICES
• A service is an application that runs in the
background
• Windows Services Manager
• Know how to open it
• Know how to start and stop services with it
Collective Imagination 2021 is a Gallery Systems Event
BASIC TOOLS
• Have an account with Local Admin Rights
• Install SQL Server Management Studio (SSMS)
• https://docs.microsoft.com/sql/ssms/download-
sql-server-management-studio-ssms
• https://sqlserverupdates.com/
Collective Imagination 2021 is a Gallery Systems Event
BEST PRACTICES
Versions, Editions & Licensing
Collective Imagination 2021 is a Gallery Systems Event
SQL SERVER VERSIONS
Version Release Date Support Until Extended Until TMS Version
SQL Server 2008 11/6/2008 7/8/2014 7/9/2019 TMS 2014*
SQL Server 2008 R2 7/20/2010 7/8/2014 7/9/2019 TMS 2014
SQL Server 2012 5/20/2012 7/11/2017 7/12/2022 TMS 2014, 2016, 2017*, 2018*
SQL Server 2014 5/6/2014 7/9/2019 7/9/2024 TMS 2014, 2016, 2017, 2018
SQL Server 2016 6/1/2016 7/13/2021 7/14/2026 TMS 2016, 2017, 2018, 2020, 2021
SQL Server 2017 9/29/2017 10/11/2022 10/12/2027 TMS 2017*, 2018, 2020, 2021
SQL Server 2019 11/4/2019 1/7/2025 1/8/2030 TMS 2020, 2021
* presumed, but no longer officially supported by Gallery Systems
Collective Imagination 2021 is a Gallery Systems Event
Express
• Minimal feature set
• Limitations:
• Lesser of 1 socket
or 4 cores
• 1410 MB RAM
• 10 GB database
• Free
Standard
• Lacks advanced
features from
Enterprise edition
• Limitations:
• Lesser of 4 sockets
or 24 cores
• 128 GB RAM
• Paid
Enterprise
• Full feature set
• Always On
Availability Group
• Clustering
• No limitations
• Paid ($$$)
Developer
• Same as Enterprise
edition
• Single user for
development
• Free
SQL SERVER EDITIONS
Collective Imagination 2021 is a Gallery Systems Event
Core Based
• Unlimited number
of users/devices
• Pay for the number of cores
on the physical CPU
• Core licenses are sold in
packs of two
Server + CAL
• License any physical
operating system running
SQL server
• Purchase a Client Access
License (CAL) for every
user/device
HOW IS SQL SERVER LICENSED?
Collective Imagination 2021 is a Gallery Systems Event
RESOURCES
https://sqlserverupdates.com/
https://sqlserverbuilds.blogspot.com/
https://metrixdata360.com/license-series/sql-
server-licensing-explained/
Third-Party Software Compatibility PDF
Collective Imagination 2021 is a Gallery Systems Event
BEST PRACTICES
Best Practices
Collective Imagination 2021 is a Gallery Systems Event
DEDICATED SERVER
• Have a dedicated physical server or virtual
machine for your database engine
• Avoid having multiple instances of SQL Server
on the same physical server or virtual
machine
Collective Imagination 2021 is a Gallery Systems Event
Feature required:
• Database Engine
Services
• Client Tools
Connectivity
ONLY INSTALL WHAT YOU NEED
Collective Imagination 2021 is a Gallery Systems Event
SQL SERVER AGENT
• A job is a task to be executed
• Can be scheduled
• Can be in response to a specific event
• Can be on demand
• Start SQL Server Agent!!
Collective Imagination 2021 is a Gallery Systems Event
MULTIPLE DRIVES
Database and Log
Files
TempDB Files
Operating System
C:
Collective Imagination 2021 is a Gallery Systems Event
MULTIPLE TEMPDB FILES
• A single database file can become a
bottleneck
• Add 7 additional database files
• Make all the files the same size, filling the
drive
Collective Imagination 2021 is a Gallery Systems Event
• Use Domain accounts
• Complex password
• Managed Service
Account (MSA)
• Only make changes in
SQL Server
Configuration Manager
SEPARATE SERVICE ACCOUNTS
Collective Imagination 2021 is a Gallery Systems Event
SECURE YOUR SA ACCOUNT
1. Change the password to a strong password:
https://passwordgenerator.net
2. Rename “sa” account
• Avoid “sysadmin”, “admin” and “nimda”
3. Disable the account
Collective Imagination 2021 is a Gallery Systems Event
ENABLE & CONFIGURE DATABASE MAIL
• Sends emails directly from the database
engine using sp_send_dbmail
• Use a dedicated email address
• To configure, you will need:
• Email address & password
• Email server address
• Email server port number
Collective Imagination 2021 is a Gallery Systems Event
BEST PRACTICES
Disaster Recovery
Collective Imagination 2021 is a Gallery Systems Event
SEPARATE DRIVE FOR BACKUPS
• Use a network drive
• Make sure your SQL Server Agent service
account has read/write access to this location
• Reference with a UNC path,
instead of a mapped network drive
Collective Imagination 2021 is a Gallery Systems Event
RAID, snapshots, and machine
images are NOT database
backups!!
- Chad Petrovay
Collective Imagination 2021 is a Gallery Systems Event
Full
• Complete copy of the
database
• Allows the simplest
form of database
restoration
Differential
• Contains only
changes that have
occurred since the
last full backup
• Smaller in size
• Adds steps to the
restoration process
Log
• Contains a log of
every change of data
• The most
complicated
restoration process
• Permits restoration
to a specific point in
time
BACKUP TYPES
Collective Imagination 2021 is a Gallery Systems Event
RPO
• Recovery Point Objective
• Maximum length of time
permitted that data can be
restored from, which may or
may not mean data loss.
RTO
• Recovery Time Objective
• Targeted duration of time
between the event of failure
and the point where
operations resume.
WHAT’S YOUR NUMBER?
Collective Imagination 2021 is a Gallery Systems Event
Full
• Saturday
• 11PM
• Retain 90 days
Differential
• Monday to Friday
• 11PM
• Retain 30 days
Log
• Daily
• Every 15 minutes
• Retain 48 hours
THE MORGAN’S STRATEGY
Collective Imagination 2021 is a Gallery Systems Event
HOW TO AUTOMATE BACKUPS
• Maintenance Plans
• Right-click on Management » Maintenance Plans
• Select Maintenance Plan Wizard
• Ola Hallengren’s free backup script
• https://ola.hallengren.com/
• Third Party Tool
• SqlBackupAndFTP
• Idera’s SQL Safe Backup
Collective Imagination 2021 is a Gallery Systems Event
TEST YOUR BACKUPS & PRACTICE RESTORES
• Test restorations on a sandbox server
• Develop a checklist
• Document the restoration process
• Periodically test the backups by performing
restorations
Collective Imagination 2021 is a Gallery Systems Event
BEST PRACTICES
Reliability / Performance
Collective Imagination 2021 is a Gallery Systems Event
SQL SERVER IS A MEMORY HOG
• SQL Server does not release memory back to
the operating system (OS)
• Try to get as much memory as you can
• Express: 1410 MB RAM max
• Standard: 128 GB RAM max
Collective Imagination 2021 is a Gallery Systems Event
CONFIGURE MAX SERVER MEMORY
• M = x - y
• x = total RAM in MB
• Conversion: 1 GB = 1024 MB
• y = the larger of 4096 or (0.1x)
• M = Max Server Memory
• Set Max Server Memory in Server Properties
• Assumes no additional instances or services
Collective Imagination 2021 is a Gallery Systems Event
• Disable: SQL Server
Telemetry
• Disable: SQL Server
CEIP service
• Automatic: SQL
Server Agent
SERVICES
Collective Imagination 2021 is a Gallery Systems Event
DATABASE & JOB OWNERSHIP
• Avoid ownership
problems
• Change owner to
your renamed “sa”
account
Collective Imagination 2021 is a Gallery Systems Event
SQL SERVER AGENT ALERT SYSTEM
• Enable the Alert System
• Specify profile from Database Mail
• Add Operators
• Consider using a distribution list to notify
multiple people simultaneously
Collective Imagination 2021 is a Gallery Systems Event
ADD NOTIFICATIONS TO JOBS
• Specify an operator
• Specify when to be
notified:
• On failure
• On success
• On completion
Collective Imagination 2021 is a Gallery Systems Event
ADD ALERTS TO SQL SERVER AGENT
• Enable Alerts for …
• Severity 17 and higher
• Error number 823, 824, 825
• https://www.brentozar.com/go/alert
• Test alerts using RAISERROR
Collective Imagination 2021 is a Gallery Systems Event
After this change, you’ll be able to sleep at night
knowing your SQL Server is working well. Or
you’ll be awakened constantly by the sound of
your phone because SQL isn’t working well.
Either way, you’re a winner.
- Brent Ozar
Collective Imagination 2021 is a Gallery Systems Event
BEST PRACTICES
Server/Database Health
Collective Imagination 2021 is a Gallery Systems Event
PATCHES & UPDATES
• Keep your Operating System up to date
• Keep your SQL Server Instance up to date
• https://sqlserverupdates.com/
• https://sqlserverbuilds.blogspot.com/
Collective Imagination 2021 is a Gallery Systems Event
CHECK DATABASE INTEGRITY
• SQL: DBCC CHECKDB
• DBConfig
• Management » Database » Run DBCC CheckDB()
• Maintenance Plans
• Check Database Integrity
• Ola Hallengren’s SQL Server Maintenance
Solution
Collective Imagination 2021 is a Gallery Systems Event
INDEX MAINTAIN INDEX & COLUMN STATISTICS
• DBConfig
• Management » Database » Update DB
Statistic
• Maintenance Plans
• Reorganize Index, Rebuild Index, Update
Statistics
• Ola Hallengren’s SQL Server Maintenance
Solution
Collective Imagination 2021 is a Gallery Systems Event
A LITTLE CLEANUP
• Only Shrink Database when needed
• Remove older data from MSDB
• Job History
• Backup History
• Database Mail Sent Items
Collective Imagination 2021 is a Gallery Systems Event
BEST PRACTICES
Tips & a great feature
Collective Imagination 2021 is a Gallery Systems Event
GETTING HELP
• Stack Exchange is a network of Q-and-A
website
• Stack Overflow
• Database Administrators
• Follow the rules
• Proactively build reputation
Collective Imagination 2021 is a Gallery Systems Event
CHANGING THEMES IN SSMS
• Select Themes
• Tools » Options » Environment » General
• A Dark Theme option is suppressed in the UI
• Google your version of SSMS for instructions
for making it available
Collective Imagination 2021 is a Gallery Systems Event
XP_CMDSHELL STORED PROCEDURE
• Execute DOS commands directly from the
database engine using xp_cmdshell
• Secure your “sa” account before enabling
• Who remembers DOS?
Collective Imagination 2021 is a Gallery Systems Event
Fix your security and then turn on
xp_cmdshell. It’s a wonderful tool and
you’re missing out on it because of
bad security practices and myth.
- Jeff Moden
Collective Imagination 2021 is a Gallery Systems Event
XP_CMDSHELL STORED PROCEDURE
• Execute DOS commands directly from the
database engine using xp_cmdshell
• Secure your “sa” account before enabling
• Who remembers DOS?
Collective Imagination 2021 is a Gallery Systems Event
THE RELUCTANT DBA
•The goal is NOT perfection
•The goal is a stable, reliable
database server
Collective Imagination 2021 is a Gallery Systems Event
Q & A
Chad Petrovay
cpetrovay@themorgan.org
chad@petrovay.com
http://www.petrovay.com/tag/reluctant-dba/

More Related Content

PDF
Dqs mds-matching 15042015
DOCX
EIM Tutorial
PDF
Data Quality Services in SQL Server 2012
PPTX
Master Data Services - 2016 - Huntington Beach
PDF
Data quality services
PPTX
Introduction to Microsoft’s Master Data Services (MDS)
PPTX
MDS & SQL 2012
PDF
Microsoft master data services mds overview
Dqs mds-matching 15042015
EIM Tutorial
Data Quality Services in SQL Server 2012
Master Data Services - 2016 - Huntington Beach
Data quality services
Introduction to Microsoft’s Master Data Services (MDS)
MDS & SQL 2012
Microsoft master data services mds overview

What's hot (20)

PPTX
Master Data Services - used for than just data
PPTX
Master Data Management
PPTX
Introduction to Microsoft SQL Server 2008 R2 Analysis Service
PDF
Building Data Warehouse in SQL Server
PDF
Whats New Sql Server 2008 R2
DOCX
Ibm info sphere datastage tutorial part 1 architecture examples
PDF
SQL Server 2008 New Features
PDF
Taming the shrew, Optimizing Power BI Options
PDF
DB PowerStudio XE DataSheet
PPTX
Introduction to microsoft sql server 2008 r2
PPTX
SKILLWISE-SSIS DESIGN PATTERN FOR DATA WAREHOUSING
PPTX
SQL - Parallel Data Warehouse (PDW)
DOC
SQL_DBA USA_M&T Bank
PDF
Statistics and Indexes Internals
PDF
Data virtualization
PPTX
Introduction to Business Intelligence in Microsoft SQL Server 2008 R2
PDF
Whats New Sql Server 2008 R2 Cw
PPTX
Data Vault Automation at the Bijenkorf
PPT
It ready dw_day3_rev00
PDF
Considerations for Data Access in the Lakehouse
Master Data Services - used for than just data
Master Data Management
Introduction to Microsoft SQL Server 2008 R2 Analysis Service
Building Data Warehouse in SQL Server
Whats New Sql Server 2008 R2
Ibm info sphere datastage tutorial part 1 architecture examples
SQL Server 2008 New Features
Taming the shrew, Optimizing Power BI Options
DB PowerStudio XE DataSheet
Introduction to microsoft sql server 2008 r2
SKILLWISE-SSIS DESIGN PATTERN FOR DATA WAREHOUSING
SQL - Parallel Data Warehouse (PDW)
SQL_DBA USA_M&T Bank
Statistics and Indexes Internals
Data virtualization
Introduction to Business Intelligence in Microsoft SQL Server 2008 R2
Whats New Sql Server 2008 R2 Cw
Data Vault Automation at the Bijenkorf
It ready dw_day3_rev00
Considerations for Data Access in the Lakehouse
Ad

Similar to A Crash Course in SQL Server Administration for Reluctant Database Administrators (20)

PDF
Sqlref
PDF
DesignMind SQL Server 2008 Migration
PPTX
Microsoft SQL Server 2012
PPTX
Managing SQLserver for the reluctant DBA
PPTX
SSDT Workshop @ SQL Bits X (2012-03-29)
PDF
Session 2: SQL Server 2012 with Christian Malbeuf
PDF
SQL Server Integration Services – Enterprise Manageability
PDF
Keep your data safe by moving from unsupported SQL Server 2008 to SQL Server ...
PPTX
Sql server 2012 dba online training
PDF
Admin Tech Ed Presentation Hardening Sql Server
PPTX
Building a Better Workstation
PPTX
Demo first slide
PDF
EMC NetWorker Module for Microsoft SQL Server Administrators ...
PPTX
Defy the Defaults
PPTX
Online sql dba training
PPTX
Db As Behaving Badly... Worst Practices For Database Administrators Rod Colledge
PDF
Idera live 2021: Managing Digital Transformation on a Budget by Bert Scalzo
PPTX
Business Intelligence For It Professionals Part 2 Seamless Data Integration 90
DOCX
Trainmesfottech - Sql Server DBA Training Course Content
PDF
SQL Server Performance Tuning Baseline
Sqlref
DesignMind SQL Server 2008 Migration
Microsoft SQL Server 2012
Managing SQLserver for the reluctant DBA
SSDT Workshop @ SQL Bits X (2012-03-29)
Session 2: SQL Server 2012 with Christian Malbeuf
SQL Server Integration Services – Enterprise Manageability
Keep your data safe by moving from unsupported SQL Server 2008 to SQL Server ...
Sql server 2012 dba online training
Admin Tech Ed Presentation Hardening Sql Server
Building a Better Workstation
Demo first slide
EMC NetWorker Module for Microsoft SQL Server Administrators ...
Defy the Defaults
Online sql dba training
Db As Behaving Badly... Worst Practices For Database Administrators Rod Colledge
Idera live 2021: Managing Digital Transformation on a Budget by Bert Scalzo
Business Intelligence For It Professionals Part 2 Seamless Data Integration 90
Trainmesfottech - Sql Server DBA Training Course Content
SQL Server Performance Tuning Baseline
Ad

More from Chad Petrovay (8)

PDF
Developing Dynamic Reports for TMS Using Crystal Reports
PPTX
How Clean is your Database? Data Scrubbing for all Skill Sets
PDF
The Museum System & Social Media: Changing their relationship status from ‘It...
PDF
The Museum System (TMS) & Researchers: Synergizing Collection and Library Inf...
PDF
How Clean is your database? Data scrubbing for all skills sets
PDF
Advanced Crystal Reports: Techniques for compiling Annual Reports & other sta...
PDF
The Rest of the Collection: Using virtual objects to manage abstract objects,...
PDF
TMS as a Remote Application
Developing Dynamic Reports for TMS Using Crystal Reports
How Clean is your Database? Data Scrubbing for all Skill Sets
The Museum System & Social Media: Changing their relationship status from ‘It...
The Museum System (TMS) & Researchers: Synergizing Collection and Library Inf...
How Clean is your database? Data scrubbing for all skills sets
Advanced Crystal Reports: Techniques for compiling Annual Reports & other sta...
The Rest of the Collection: Using virtual objects to manage abstract objects,...
TMS as a Remote Application

Recently uploaded (20)

PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
medical staffing services at VALiNTRY
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Transform Your Business with a Software ERP System
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
System and Network Administraation Chapter 3
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
ai tools demonstartion for schools and inter college
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Essential Infomation Tech presentation.pptx
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PTS Company Brochure 2025 (1).pdf.......
medical staffing services at VALiNTRY
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Transform Your Business with a Software ERP System
Wondershare Filmora 15 Crack With Activation Key [2025
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Design an Analysis of Algorithms II-SECS-1021-03
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Upgrade and Innovation Strategies for SAP ERP Customers
Understanding Forklifts - TECH EHS Solution
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
System and Network Administraation Chapter 3
Navsoft: AI-Powered Business Solutions & Custom Software Development
ai tools demonstartion for schools and inter college
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Essential Infomation Tech presentation.pptx
2025 Textile ERP Trends: SAP, Odoo & Oracle

A Crash Course in SQL Server Administration for Reluctant Database Administrators

  • 1. Collective Imagination 2021 is a Gallery Systems Event A CRASH COURSE IN SQL SERVER ADMINISTRATION FOR RELUCTANT DATABASE ADMINISTRATORS Chad Petrovay, TMS Administrator, The Morgan Library & Museum
  • 2. Collective Imagination 2021 is a Gallery Systems Event Reluctant DBAs are those of us who haven't had formal training in administering a database and are surviving on a combination of our wits, Books Online (BOL), and technical manuals. - Josef Finsel
  • 3. Collective Imagination 2021 is a Gallery Systems Event THE RELUCTANT DBA •The goal is NOT perfection •The goal is a stable, reliable database server
  • 4. Collective Imagination 2021 is a Gallery Systems Event WHAT IS SQL SERVER? TMS (Database) Physical Server (Hardware/OS) Database Engine (Software)
  • 5. Collective Imagination 2021 is a Gallery Systems Event SERVICES • A service is an application that runs in the background • Windows Services Manager • Know how to open it • Know how to start and stop services with it
  • 6. Collective Imagination 2021 is a Gallery Systems Event BASIC TOOLS • Have an account with Local Admin Rights • Install SQL Server Management Studio (SSMS) • https://docs.microsoft.com/sql/ssms/download- sql-server-management-studio-ssms • https://sqlserverupdates.com/
  • 7. Collective Imagination 2021 is a Gallery Systems Event BEST PRACTICES Versions, Editions & Licensing
  • 8. Collective Imagination 2021 is a Gallery Systems Event SQL SERVER VERSIONS Version Release Date Support Until Extended Until TMS Version SQL Server 2008 11/6/2008 7/8/2014 7/9/2019 TMS 2014* SQL Server 2008 R2 7/20/2010 7/8/2014 7/9/2019 TMS 2014 SQL Server 2012 5/20/2012 7/11/2017 7/12/2022 TMS 2014, 2016, 2017*, 2018* SQL Server 2014 5/6/2014 7/9/2019 7/9/2024 TMS 2014, 2016, 2017, 2018 SQL Server 2016 6/1/2016 7/13/2021 7/14/2026 TMS 2016, 2017, 2018, 2020, 2021 SQL Server 2017 9/29/2017 10/11/2022 10/12/2027 TMS 2017*, 2018, 2020, 2021 SQL Server 2019 11/4/2019 1/7/2025 1/8/2030 TMS 2020, 2021 * presumed, but no longer officially supported by Gallery Systems
  • 9. Collective Imagination 2021 is a Gallery Systems Event Express • Minimal feature set • Limitations: • Lesser of 1 socket or 4 cores • 1410 MB RAM • 10 GB database • Free Standard • Lacks advanced features from Enterprise edition • Limitations: • Lesser of 4 sockets or 24 cores • 128 GB RAM • Paid Enterprise • Full feature set • Always On Availability Group • Clustering • No limitations • Paid ($$$) Developer • Same as Enterprise edition • Single user for development • Free SQL SERVER EDITIONS
  • 10. Collective Imagination 2021 is a Gallery Systems Event Core Based • Unlimited number of users/devices • Pay for the number of cores on the physical CPU • Core licenses are sold in packs of two Server + CAL • License any physical operating system running SQL server • Purchase a Client Access License (CAL) for every user/device HOW IS SQL SERVER LICENSED?
  • 11. Collective Imagination 2021 is a Gallery Systems Event RESOURCES https://sqlserverupdates.com/ https://sqlserverbuilds.blogspot.com/ https://metrixdata360.com/license-series/sql- server-licensing-explained/ Third-Party Software Compatibility PDF
  • 12. Collective Imagination 2021 is a Gallery Systems Event BEST PRACTICES Best Practices
  • 13. Collective Imagination 2021 is a Gallery Systems Event DEDICATED SERVER • Have a dedicated physical server or virtual machine for your database engine • Avoid having multiple instances of SQL Server on the same physical server or virtual machine
  • 14. Collective Imagination 2021 is a Gallery Systems Event Feature required: • Database Engine Services • Client Tools Connectivity ONLY INSTALL WHAT YOU NEED
  • 15. Collective Imagination 2021 is a Gallery Systems Event SQL SERVER AGENT • A job is a task to be executed • Can be scheduled • Can be in response to a specific event • Can be on demand • Start SQL Server Agent!!
  • 16. Collective Imagination 2021 is a Gallery Systems Event MULTIPLE DRIVES Database and Log Files TempDB Files Operating System C:
  • 17. Collective Imagination 2021 is a Gallery Systems Event MULTIPLE TEMPDB FILES • A single database file can become a bottleneck • Add 7 additional database files • Make all the files the same size, filling the drive
  • 18. Collective Imagination 2021 is a Gallery Systems Event • Use Domain accounts • Complex password • Managed Service Account (MSA) • Only make changes in SQL Server Configuration Manager SEPARATE SERVICE ACCOUNTS
  • 19. Collective Imagination 2021 is a Gallery Systems Event SECURE YOUR SA ACCOUNT 1. Change the password to a strong password: https://passwordgenerator.net 2. Rename “sa” account • Avoid “sysadmin”, “admin” and “nimda” 3. Disable the account
  • 20. Collective Imagination 2021 is a Gallery Systems Event ENABLE & CONFIGURE DATABASE MAIL • Sends emails directly from the database engine using sp_send_dbmail • Use a dedicated email address • To configure, you will need: • Email address & password • Email server address • Email server port number
  • 21. Collective Imagination 2021 is a Gallery Systems Event BEST PRACTICES Disaster Recovery
  • 22. Collective Imagination 2021 is a Gallery Systems Event SEPARATE DRIVE FOR BACKUPS • Use a network drive • Make sure your SQL Server Agent service account has read/write access to this location • Reference with a UNC path, instead of a mapped network drive
  • 23. Collective Imagination 2021 is a Gallery Systems Event RAID, snapshots, and machine images are NOT database backups!! - Chad Petrovay
  • 24. Collective Imagination 2021 is a Gallery Systems Event Full • Complete copy of the database • Allows the simplest form of database restoration Differential • Contains only changes that have occurred since the last full backup • Smaller in size • Adds steps to the restoration process Log • Contains a log of every change of data • The most complicated restoration process • Permits restoration to a specific point in time BACKUP TYPES
  • 25. Collective Imagination 2021 is a Gallery Systems Event RPO • Recovery Point Objective • Maximum length of time permitted that data can be restored from, which may or may not mean data loss. RTO • Recovery Time Objective • Targeted duration of time between the event of failure and the point where operations resume. WHAT’S YOUR NUMBER?
  • 26. Collective Imagination 2021 is a Gallery Systems Event Full • Saturday • 11PM • Retain 90 days Differential • Monday to Friday • 11PM • Retain 30 days Log • Daily • Every 15 minutes • Retain 48 hours THE MORGAN’S STRATEGY
  • 27. Collective Imagination 2021 is a Gallery Systems Event HOW TO AUTOMATE BACKUPS • Maintenance Plans • Right-click on Management » Maintenance Plans • Select Maintenance Plan Wizard • Ola Hallengren’s free backup script • https://ola.hallengren.com/ • Third Party Tool • SqlBackupAndFTP • Idera’s SQL Safe Backup
  • 28. Collective Imagination 2021 is a Gallery Systems Event TEST YOUR BACKUPS & PRACTICE RESTORES • Test restorations on a sandbox server • Develop a checklist • Document the restoration process • Periodically test the backups by performing restorations
  • 29. Collective Imagination 2021 is a Gallery Systems Event BEST PRACTICES Reliability / Performance
  • 30. Collective Imagination 2021 is a Gallery Systems Event SQL SERVER IS A MEMORY HOG • SQL Server does not release memory back to the operating system (OS) • Try to get as much memory as you can • Express: 1410 MB RAM max • Standard: 128 GB RAM max
  • 31. Collective Imagination 2021 is a Gallery Systems Event CONFIGURE MAX SERVER MEMORY • M = x - y • x = total RAM in MB • Conversion: 1 GB = 1024 MB • y = the larger of 4096 or (0.1x) • M = Max Server Memory • Set Max Server Memory in Server Properties • Assumes no additional instances or services
  • 32. Collective Imagination 2021 is a Gallery Systems Event • Disable: SQL Server Telemetry • Disable: SQL Server CEIP service • Automatic: SQL Server Agent SERVICES
  • 33. Collective Imagination 2021 is a Gallery Systems Event DATABASE & JOB OWNERSHIP • Avoid ownership problems • Change owner to your renamed “sa” account
  • 34. Collective Imagination 2021 is a Gallery Systems Event SQL SERVER AGENT ALERT SYSTEM • Enable the Alert System • Specify profile from Database Mail • Add Operators • Consider using a distribution list to notify multiple people simultaneously
  • 35. Collective Imagination 2021 is a Gallery Systems Event ADD NOTIFICATIONS TO JOBS • Specify an operator • Specify when to be notified: • On failure • On success • On completion
  • 36. Collective Imagination 2021 is a Gallery Systems Event ADD ALERTS TO SQL SERVER AGENT • Enable Alerts for … • Severity 17 and higher • Error number 823, 824, 825 • https://www.brentozar.com/go/alert • Test alerts using RAISERROR
  • 37. Collective Imagination 2021 is a Gallery Systems Event After this change, you’ll be able to sleep at night knowing your SQL Server is working well. Or you’ll be awakened constantly by the sound of your phone because SQL isn’t working well. Either way, you’re a winner. - Brent Ozar
  • 38. Collective Imagination 2021 is a Gallery Systems Event BEST PRACTICES Server/Database Health
  • 39. Collective Imagination 2021 is a Gallery Systems Event PATCHES & UPDATES • Keep your Operating System up to date • Keep your SQL Server Instance up to date • https://sqlserverupdates.com/ • https://sqlserverbuilds.blogspot.com/
  • 40. Collective Imagination 2021 is a Gallery Systems Event CHECK DATABASE INTEGRITY • SQL: DBCC CHECKDB • DBConfig • Management » Database » Run DBCC CheckDB() • Maintenance Plans • Check Database Integrity • Ola Hallengren’s SQL Server Maintenance Solution
  • 41. Collective Imagination 2021 is a Gallery Systems Event INDEX MAINTAIN INDEX & COLUMN STATISTICS • DBConfig • Management » Database » Update DB Statistic • Maintenance Plans • Reorganize Index, Rebuild Index, Update Statistics • Ola Hallengren’s SQL Server Maintenance Solution
  • 42. Collective Imagination 2021 is a Gallery Systems Event A LITTLE CLEANUP • Only Shrink Database when needed • Remove older data from MSDB • Job History • Backup History • Database Mail Sent Items
  • 43. Collective Imagination 2021 is a Gallery Systems Event BEST PRACTICES Tips & a great feature
  • 44. Collective Imagination 2021 is a Gallery Systems Event GETTING HELP • Stack Exchange is a network of Q-and-A website • Stack Overflow • Database Administrators • Follow the rules • Proactively build reputation
  • 45. Collective Imagination 2021 is a Gallery Systems Event CHANGING THEMES IN SSMS • Select Themes • Tools » Options » Environment » General • A Dark Theme option is suppressed in the UI • Google your version of SSMS for instructions for making it available
  • 46. Collective Imagination 2021 is a Gallery Systems Event XP_CMDSHELL STORED PROCEDURE • Execute DOS commands directly from the database engine using xp_cmdshell • Secure your “sa” account before enabling • Who remembers DOS?
  • 47. Collective Imagination 2021 is a Gallery Systems Event Fix your security and then turn on xp_cmdshell. It’s a wonderful tool and you’re missing out on it because of bad security practices and myth. - Jeff Moden
  • 48. Collective Imagination 2021 is a Gallery Systems Event XP_CMDSHELL STORED PROCEDURE • Execute DOS commands directly from the database engine using xp_cmdshell • Secure your “sa” account before enabling • Who remembers DOS?
  • 49. Collective Imagination 2021 is a Gallery Systems Event THE RELUCTANT DBA •The goal is NOT perfection •The goal is a stable, reliable database server
  • 50. Collective Imagination 2021 is a Gallery Systems Event Q & A Chad Petrovay cpetrovay@themorgan.org chad@petrovay.com http://www.petrovay.com/tag/reluctant-dba/