01 | Install and Configure SQL Server
Module 1 Overview
Installation Decisions Design the Storage for New Databases
Plan for Growth and Capacity
Service Account Configuration
Topic: Installation Decisions
Determine the Appropriate Hardware Select the Appropriate Windows Operating System Edition
Select the Appropriate Edition of SQL Server
Determine if a Separate Instance Is Required
Select the Appropriate Collation
Determine the Appropriate Hardware
To virtualize or not to virtualize? CPU sockets and cores Memory
Memory support is a function of the Windows operating system or the chosen edition
DAS versus SAN Consider solid state storage Free, unsupported tools are available to help test I/O workloads:
SQLIO disk subsystem benchmark tool SQLIOSIM
Select the Appropriate Windows Operating System Edition
Specific editions of SQL Server are supported on specific versions and editions of Windows Client and Windows Server One way or another, the following operating systems are supported:
Windows Server 2012 Windows Server 2008 R2 and Windows Server 2008 SP2 Windows Vista, Windows 7, and Windows 8
SQL Server 2012 is supported on Windows Server 2012 core and Windows Server 2008 R2 core
No need to memorize all the combinations for the certification exam
Select the Appropriate Edition of SQL Server 2012
Editions to choose from are:
Principal Editions
Enterprise Business Intelligence Standard Evaluation
Specialized Edition(s)
Web
Breadth Editions
Express Developer
Determine if a Separate Instance Is Required
Each instance will have its own set of services and service settings Separate administration requirements
Separate instance-level configuration settings
Separate SLAs
Support for separate collations
Support for multiple versions of SQL Server Know which features can be installed as instances
Select the Appropriate Collation
What is a collation? What is the impact of collation choice during installation? Where can collation be specified?
DEMO
Specifying Collation at the Instance, Database, Column and Query Levels
Topic: Design the Storage for New Databases
Drive Layout: Design Windows File System for Expected I/O Patterns Consider Multiple Filegroup and Multiple Data File Designs Table Partitioning Design
Drive Layout: Design Windows File System for Expected I/O Patterns
Separate I/O activity on systems with heavy workloads:
OS vs. data file(s) vs. log file Consider separating TempDB workload Consider adding multiple data files to TempDB
Use appropriate RAID levels and parity when appropriate Consider adding multiple data files to TempDB for large workloads
Consider Multiple Filegroup and Multiple Data File Designs
Use this advanced design technique for two reasons:
Performance
More read/write heads involved in reading and writing
Maintenance
Smaller units of data backed up/restored, indexes reorganized/rebuilt
Table Partitioning Design
Table partitioning spreads the data of a single table over multiple filegroups Purpose
Use more read/write heads to separate I/O activity over separate partitions Efficiently load new data into a (large) table
Perform index maintenance on a partition by partition basis
Concept of index alignment References
Designing Partitions to Manage Subsets of Data SlidingWindow example
DEMO
Creating a Database with an Advanced Design
Topic: Plan for Growth and Capacity
Two DBA Cardinal Sins Manual File Growth File Autogrow Options Growth Monitoring Shrinking Databases and Files
Two DBA Cardinal Sins
Running out of space in a SQL Server data or log file Allowing a data or log file to fill up a volume when autogrow is used
Manual File Growth
Why manual?
Timing and control
Methods
GUI Code
File Autogrow Options
Why autogrow? Percent vs. fixed size
Should maximum file size be set?
Methods
GUI Code
Growth Monitoring
If/when to shrink or grow Monitoring tools and techniques
Code in agent jobs Performance object alert Management Data Warehouse Catalogs and DMVs
sys.database_files sys.dm_os_volume_stats
Stored procedures
sp_SpaceUsed sp_Databases
DBCC SQLPerf (logspace)
Shrinking Databases and Files
Databases (all files) can be shrunk Individual data and log files can be shrunk
Autoshrink can be set as a database option
Just say No Turned off by default
Manual shrinking only relevant in one context
DEMO
Growing File Size Manually Using the GUI and Code
Topic: Service Account Configuration
Account Selection During Installation Changing Account Choices After Installation
Which tool? Why that tool?
On What Basis Do I Select Accounts to Run Services?
Account Selection During Installation
Builtin Account
Local Service Network Service Local System
Created Account
Machine Local Domain
General rule: create a separate account for each service, for each instancereally!
Changing Account Choices After Installation
Use SQL Server Configuration Manager Dont use the Services management console in Windows
On What Basis Do I Select Accounts to Run Services?
Database engine can use a low-privileged account Browser and Full-Text Services shouldnt require a domain account either SQL Server Agent may need access to:
Mailbox UNC shares and file systems Other SQL Servers
Reference: Configure Windows Service Accounts and Permissions
DEMO
Changing Service Account Assignment