Upload
jeetendra-shrestha
View
253
Download
1
Embed Size (px)
Citation preview
8/13/2019 01 Install and Configure SQL Server
1/30
8/13/2019 01 Install and Configure SQL Server
2/30
Module 1 Overview
Installation Decisions
Design the Storage for New Databases
Plan for Growth and Capacity
Service Account Configuration
8/13/2019 01 Install and Configure SQL Server
3/30
8/13/2019 01 Install and Configure SQL Server
4/30
Topic: Installation Decisions
Determine the Appropriate Hardware
Select the Appropriate Windows Operating System E
Select the Appropriate Edition of SQL Server
Determine if a Separate Instance Is Required
Select the Appropriate Collation
8/13/2019 01 Install and Configure SQL Server
5/30
Determine the Appropriate Hardware
To virtualizeor notto virtualize?
CPU sockets and cores
Memory Memory support is a function ofthe Windows operating system or
edition
DAS versus SAN Consider solid state storage
Free, unsupported tools are available to help test I/O worklo SQLIOdisk subsystem benchmark tool
SQLIOSIM
http://www.brentozar.com/archive/2009/03/why-would-you-virtualize-sql-server/http://www.brentozar.com/archive/2009/03/reasons-why-you-shouldnt-virtualize-sql-server/http://msdn.microsoft.com/en-us/library/cc645993(v=SQL.110).aspxhttp://sqlmag.com/storage/using-solid-state-disks-sql-server-storage-solutionshttp://www.microsoft.com/en-us/download/details.aspx?id=20163http://blogs.msdn.com/b/sqlserverstorageengine/archive/2006/10/06/sqliosim-available-for-download.aspxhttp://blogs.msdn.com/b/sqlserverstorageengine/archive/2006/10/06/sqliosim-available-for-download.aspxhttp://www.microsoft.com/en-us/download/details.aspx?id=20163http://sqlmag.com/storage/using-solid-state-disks-sql-server-storage-solutionshttp://msdn.microsoft.com/en-us/library/cc645993(v=SQL.110).aspxhttp://www.brentozar.com/archive/2009/03/reasons-why-you-shouldnt-virtualize-sql-server/http://www.brentozar.com/archive/2009/03/why-would-you-virtualize-sql-server/8/13/2019 01 Install and Configure SQL Server
6/30
Select the Appropriate Windows Operating Edition
Specific editions of SQL Server are supported on specific ver
editions of Windows Client and Windows Server One way or another, the following operating systems are sup
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 coreWindows Server 2008 R2 core
No need to memorize all the combinations for the certificatio
http://msdn.microsoft.com/en-us/library/ms143506.aspxhttp://msdn.microsoft.com/en-us/library/ms143506.aspx8/13/2019 01 Install and Configure SQL Server
7/30
Select the Appropriate Edition of SQL Serve
Editionsto choose from are: Principal Editions
Enterprise
Business Intelligence
Standard
Evaluation
Specialized Edition(s) Web
Breadth Editions Express
Developer
http://msdn.microsoft.com/en-us/library/ms144275.aspxhttp://www.microsoft.com/betaexperience/pd/SQL2012EvalCTA/enus/default.aspxhttp://www.microsoft.com/en-us/sqlserver/editions/2012-editions/express.aspxhttp://www.microsoftstore.com/store/msusa/en_US/pdp/SQL-Server-Developer-Edition-2012/productID.281182300http://www.microsoftstore.com/store/msusa/en_US/pdp/SQL-Server-Developer-Edition-2012/productID.281182300http://www.microsoft.com/en-us/sqlserver/editions/2012-editions/express.aspxhttp://www.microsoft.com/betaexperience/pd/SQL2012EvalCTA/enus/default.aspxhttp://msdn.microsoft.com/en-us/library/ms144275.aspx8/13/2019 01 Install and Configure SQL Server
8/30
Determine if a Separate Instance Is Requ
Each instance will have its own set ofservices and service settings
Separate administration requirements
Separate instance-level configurationsettings
Separate SLAs
Support for separate collations
Support for multiple versions of SQLServer
Know which features can be installedas instances
8/13/2019 01 Install and Configure SQL Server
9/30
Select the Appropriate Collation
What is a collation?
What is the impact ofcollation choice duringinstallation?
Where can collation bespecified?
8/13/2019 01 Install and Configure SQL Server
10/30
DEMOSpecifying Collation at the Instance, Database, Cand Query Levels
8/13/2019 01 Install and Configure SQL Server
11/30
8/13/2019 01 Install and Configure SQL Server
12/30
Topic: Design the Storage for New Datab
Drive Layout: Design
Windows File System forExpected I/O Patterns
Consider MultipleFilegroup and Multiple
Data File Designs Table Partitioning
Design
8/13/2019 01 Install and Configure SQL Server
13/30
Drive Layout: Design Windows File System foExpected I/O Patterns
Separate I/O activity on systems
with heavy workloads: OS vs. data file(s) vs. log file
Consider separating TempDBworkload
Consider adding multiple data filesto TempDB
Use appropriate RAID levelsandparity when appropriate
Consider adding multiple data filesto TempDBfor large workloads
http://www.acnc.com/raidhttp://technet.microsoft.com/en-us/library/ms175527(v=SQL.105).aspxhttp://www.e-squillace.com/tech/techdiagrams/DCBB_File_System_Design_Options.pnghttp://technet.microsoft.com/en-us/library/ms175527(v=SQL.105).aspxhttp://www.acnc.com/raid8/13/2019 01 Install and Configure SQL Server
14/30
Consider Multiple Filegroup and Multiple Data Fi
Use this advanced design
technique for two reasons: Performance
More read/write headsinvolved in reading andwriting
Maintenance Smaller units of data backed
up/restored, indexesreorganized/rebuilt
bl
http://www.e-squillace.com/tech/techdiagrams/DCBB_Files_&_FileGroups.png8/13/2019 01 Install and Configure SQL Server
15/30
Table Partitioning Design
Table partitioning spreads thedata of a single table over
multiple filegroups
Purpose Use more read/write heads to
separate I/O activity over separatepartitions
Efficiently load new data into a (large)table
Perform index maintenance on apartition by partition basis
Concept of index alignment
References Designing Partitions to Manage
Subsets of Data
SlidingWindow example
http://technet.microsoft.com/en-us/library/ms191174.aspxhttp://technet.microsoft.com/en-us/library/ms191174.aspxhttp://technet.microsoft.com/en-us/library/ms160743.aspxhttp://www.e-squillace.com/tech/techdiagrams/SQL_Partitioned_Table_Architecture.pnghttp://technet.microsoft.com/en-us/library/ms160743.aspxhttp://technet.microsoft.com/en-us/library/ms191174.aspxhttp://technet.microsoft.com/en-us/library/ms191174.aspx8/13/2019 01 Install and Configure SQL Server
16/30
DEMOCreating a Database with an Advanced Design
8/13/2019 01 Install and Configure SQL Server
17/30
T i Pl f G th d C it
8/13/2019 01 Install and Configure SQL Server
18/30
Topic: Plan for Growth and Capacity
Two DBA Cardinal Sins
Manual File Growth
File Autogrow Options
Growth Monitoring
Shrinking Databases and Files
T DBA C di l Si
8/13/2019 01 Install and Configure SQL Server
19/30
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 auused
M l Fil G th
8/13/2019 01 Install and Configure SQL Server
20/30
Manual File Growth
Why manual?
Timing and control
Methods GUI
Code
Fil A t O ti
8/13/2019 01 Install and Configure SQL Server
21/30
File Autogrow Options
Why autogrow?
Percent vs. fixed size
Should maximum file size be set?
Methods
GUI Code
G th M it i
8/13/2019 01 Install and Configure SQL Server
22/30
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
http://www.mssqltips.com/sqlservertip/1178/monitoring-sql-server-database-transaction-log-space/http://www.mssqltips.com/sqlservertip/1178/monitoring-sql-server-database-transaction-log-space/8/13/2019 01 Install and Configure SQL Server
23/30
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
8/13/2019 01 Install and Configure SQL Server
24/30
DEMOGrowing File Size Manually Using the GUI and C
8/13/2019 01 Install and Configure SQL Server
25/30
Topic: Service Account Configuration
8/13/2019 01 Install and Configure SQL Server
26/30
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
8/13/2019 01 Install and Configure SQL Server
27/30
Account Selection During Installation
Builtin Account Local Service
Network Service
Local System
Created Account Machine Local
omain General rule: create a separate
account for each service, for eachinstancereally!
Changing Account Choices After Installa
8/13/2019 01 Install and Configure SQL Server
28/30
Changing Account Choices After Installa
Use SQL Server Configuration Manager
Dont use the Services management console in Wind
On What Basis Do I Select Accounts to Run
8/13/2019 01 Install and Configure SQL Server
29/30
On What Basis Do I Select Accounts to Run
Database engine can use a low-privileged account
Browser and Full-Text Services shouldnt require a doaccount either
SQL Server Agent may need access to: Mailbox
UNC shares and file systems Other SQL Servers
Reference: Configure Windows Service Accounts andPermissions
http://msdn.microsoft.com/en-us/library/ms143504(v=sql.110).aspxhttp://msdn.microsoft.com/en-us/library/ms143504(v=sql.110).aspxhttp://msdn.microsoft.com/en-us/library/ms143504(v=sql.110).aspxhttp://msdn.microsoft.com/en-us/library/ms143504(v=sql.110).aspx8/13/2019 01 Install and Configure SQL Server
30/30
DEMOChanging Service Account Assignment