Building and configuring sql server; Some Recommended Practices.
-
Upload
john-martin -
Category
Technology
-
view
272 -
download
1
Transcript of Building and configuring sql server; Some Recommended Practices.
![Page 1: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/1.jpg)
BUILDING & CONFIGURING SQL SERVER
Recommended Practices
![Page 2: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/2.jpg)
Tuning blog: http://www.sqlperformance.com/
E-mail [email protected] for free copies of our $10 e-books:
![Page 3: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/3.jpg)
Book a Demo with me by going to http://www.meetme.so/JohnQMartin
![Page 4: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/4.jpg)
YOUR PRESENTER• John Q Martin
o Sales Engineer for SQL Sentryo Worked with SQL Server for ~10 yearso Consultant, SQL DBA, Dev & BI Developero Former Microsoft Premier Field Engineer
• Contact Informationo Email: [email protected] Blog: http://blogs.sqlsentry.com/author/JohnMartin/ o Twitter: @SQLDiplomato LinkedIn: https://uk.linkedin.com/in/johnqmartin
![Page 5: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/5.jpg)
PLANNING
Before deploying SQL Server it is important to have a plan
Capacity Planning
What is the use case
Versions and Editions
Virtual or Physical
Cloud or On-Premises
HADR
![Page 6: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/6.jpg)
CAPACITY PLANNING
Storage
Memory
Analyse History
Project Use
Scalability
![Page 7: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/7.jpg)
PRE-DEPLOYMENT
Infrastructure Configuration• Drivers & Firmware• Correct multi-pathing configuration• Storage setup
Testing & Validation• Soak Testing• Stress Testing
![Page 8: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/8.jpg)
DEPLOYMENT
Standardise• Small number of versions• Operating System
Automate• Sysprep & Configuration Files• SPADE framework
![Page 9: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/9.jpg)
SERVICE ACCOUNTS
Compartmentalise• Use different accounts for each service
Domain accounts where possible• Manage Service Accounts (MSA)• Group Managed Service Accounts (gMSA)
![Page 10: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/10.jpg)
SQL SERVER CONFIGURATION
Trace Flags•1117 – Data File Growth•1118 – Dedicated Extents•3226 – Backup Messages
![Page 11: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/11.jpg)
SQL SERVER CONFIGURATION
sp_configureBackup checksum default
Backup compression default
Max degree of parallelism
![Page 12: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/12.jpg)
NUMA Node 1NUMA Node 0
NUMA FROM 30,000 FT
CPU 0 CPU 2
CPU 1 CPU 3
RAM 01
RAM 02
RAM 03
RAM 04
Thread 0
Thread 1
Thread 0
Thread 1
Thread 0
Thread 1
Thread 0
Thread 1
Processor Socket 0
CPU 0 CPU 2
CPU 1 CPU 3
RAM 01
RAM 02
RAM 03
RAM 04
Thread 0
Thread 1
Thread 0
Thread 1
Thread 0
Thread 1
Thread 0
Thread 1
Processor Socket 1
Typical MAXDOP setting for this configuration would be 4
![Page 13: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/13.jpg)
SQL SERVER CONFIGURATION
sp_configureBackup checksum default
Backup compression default
Max degree of parallelism
Min/Max Server Memory
Optimize for ad hoc workloads
Remote admin connections
![Page 14: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/14.jpg)
XP_CMDSHELL
It Depends!
![Page 15: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/15.jpg)
SQL SERVER CONFIGURATION
Security•Avoid using SQL Authentication•Disable and Rename SA•Proxies for Agent Jobs•Perform Volume Maintenance Tasks
![Page 16: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/16.jpg)
LOCK PAGES IN MEMORY
Tier 1 Systems• On• Cannot afford downtime/impact
Tier 2 systems• Off• Identify issue & RCA
![Page 17: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/17.jpg)
TEMPDB
Multiple Files
Dedicated storage
Separate data and log files
![Page 18: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/18.jpg)
DATABASE CONFIGURATION
Instant File Initialization
Multiple files
Separate Data and Log
Checksum page verification
Appropriate Database Owner
![Page 19: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/19.jpg)
MAINTENANCE OPERATIONS
DBCC CHECKDB
Backups
Re-indexing & Statistics Maintenance
Log Rotation
Monitor dbo.suspect_pages in MSDB
![Page 20: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/20.jpg)
MONITORING & ALERTING
Monitor key performance counters
Generate baselines
Configure SQL Agent Alerts
Policy Based Management
![Page 21: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/21.jpg)
QUESTIONS
![Page 22: Building and configuring sql server; Some Recommended Practices.](https://reader036.fdocuments.net/reader036/viewer/2022062503/589d53c51a28abef688b4a15/html5/thumbnails/22.jpg)
THANK YOU!
• Slides will be available at http://blogs.sqlsentry.com/author/johnmartin
• E-mail [email protected] for free copies of our e-books:o Just tell them where you met me
• My contact info for other questions:o Email: [email protected] o Twitter: @SQLDiplomat