Download presentation
Presentation is loading. Please wait.
1
Get the Most out of SQL Server Standard Edition
Or How to be a SQL Miser
2
About Diane Since 1984, I have been in IT. My SQL language and data management experience began in the 90’s, using an Informix database with ARC/Info. I subsequently migrated the data into Oracle, becoming an Oracle Certified DBA. In the early 2000’s I developed data models with ERwin and databases in Oracle and SQL Server for web sites. In 2002 I became a SQL Server DBA for a very busy data center. Currently, as a SQL Server DBA at Economic Research Institute, I manage the database systems in a data center and a co-location site.
3
Why Standard Edition? SQL Server Enterprise Edition (EE) far more expensive than Standard Edition (SE) Many small business systems are SE Some applications delivered with SE
4
Pricing Windows 2008 R2 Edition Cost Standard Edition $1,209
Enterprise Edition $3,999 SQL Server 2008 R2 Edition Cost Per Processor $7,171.00 $27,495.00
5
Planning Identify which servers and applications might not require EE or are already SE What features do you really need? What actually improves performance for SE?
6
EE Features (not in SE) Primarily for very large databases Concurrency
Transaction isolation Level Snapshot Partitioning Data Compression Backup Compression (before R2) Online Indexing Clustering more than 2 nodes Resource Governor
7
Limit Development Features
Do not want to be dependent on EE features Development Same configuration as production Or consciously avoid EE features Critical to test in SE
8
Maximize Resources - RAM
Windows Critical SQL Server After Windows is optimized
9
Maximize Resources - CPU
64 bit better than 32 bit Dual core better than single core Quad core better than dual core
10
Maximize Resources – I/O
Same basic tuning as with EE Without the EE features
11
System Recommendations
Windows Server 2003 R2+ Enterprise 64 bit Very important Higher maximum RAM SQL Server Standard Edition 64 bit 64 bit is highly recommended over 32 bit
12
Windows 2008 Windows 2008 R2 (64 bit only)
Max SE 32 bit SE 64 bit EE 32 bit EE 64 bit RAM 4 GB 32 GB 64 GB 2 TB CPU 4 8
13
SQL Server 2008 R2 Max SE EE CPU 8 RAM 64 GB 2 TB Size 524 PB
14
Shock! n’ AWE! Windows Standard Edition 32 bit normally limited to 4GB RAM 2 GB for Windows 2 GB for application
15
Windows 32 bit (x86) Windows 32 bit enterprise or data center edition (not standard edition) Set PAE (Physical Address Extension) Edit Boot.ini Add to the last line: /PAE Reboot server for PAE to take affect
16
Shock! The available system RAM changed from 4 GB to 8 GB
17
AWE! SQL Server Set Address Windowing Extensions (AWE)
Increases the available RAM for SQL Server Adjust the maximum memory in SQL SERVER
18
Enable AWE on 32 bit Enable in SQL Server Management Studio
Right click the server Properties Memory Check mark: Use AWE to allocate memory Enter: Minimum server memory (in MB) Maximum server memory (in MB) Restart SQL Server service
19
Enable AWE on 32 bit Or use sp_configure
sp_configure 'show advanced options', 1 RECONFIGURE GO sp_configure 'awe enabled', 1
20
Increase SQL Server Memory
exec sp_configure 'show advanced options', 1; reconfigure; exec sp_configure; exec sp_configure 'min server memory (MB)', 2000; exec sp_configure 'max server memory (MB)', 6000; Restart SQL Server service
21
Lock Pages in Memory If you receive the following message
Address Windowing Extensions (AWE) requires the 'lock pages in memory' privilege which is not currently present in the access token of the process. Set Lock Pages in Memory
22
Lock pages in Memory In 32 bit, available for SQL Server 2005 and above in 64 bit available for the following. Enterprise Edition 2005 and above Standard Edition 2005 SP4 CU4 and above, with trace flag 845 Standard Edition 2008 SP1 CU2 and above, with trace flag 845 Standard Edition 2008 R2, with trace flag 845
23
Lock pages in Memory Run gpedit.msc. Group Policy
Computer Configuration Windows Settings Security Settings Local Policies Select User Rights Assignment folder. details pane
24
Lock pages in Memory Double-click Lock pages in memory
Local Security Policy Setting Add User or Group Add an account with privileges to run sqlservr.exe (SQL Server Service) Enter the Windows account Restart SQL Server service
25
Turn off Hyper-Threading
Turn off Hyper-Threading on the server Hyper-Threading and SQL Server both use the L1 cache Conflict with each other
26
Turn off Hyper-Threading
If the number of CPUs is twice the physical processors, disable Hyper-Threading During boot up, get into the system settings Processor Settings Logical Processor Change from Enabled to Disabled Reboot Verify in Task Manager
27
Database Backup Compression
2008 R2 SE has backup compression 2005 and 2008 can use third party Red Gate SQL Backup Quest LiteSpeed Others
28
Performance Tuning Same as EE, except avoid EE features
Tuning more critical in SE CPU directly affected by I/O I/O Efficient disk configuration Indexes Table variables vs temp tables Identify high cost queries dmv SQL Profiler
29
ALTER INDEX Use REORGANIZE instead of ONLINE
ALTER INDEX MyIndexName ON MyTableName REORGANIZE; Concentrate on fragmented indexes Check the avg_fragmentation_in_percent in the dm_db_index_physical_stats
30
Database Files Tempdb and Database Percent growth Either can time out
initial growth too small later grow too large Either can time out Optimal initial data and log sizes Even growth in MB instead
31
Database Files Transaction log Autoshrink Backup regularly
Or set to SIMPLE Autoshrink Causes fragmentation Turn off autoshrink
32
Database Files Separate volumes for Data file and Log file Data file
RAID 5, if possible RAID 10 Log file RAID 1 Tempdb Multiple Data Files One file per CPU
33
SQL Server Management Studio (SSMS)
SSMS Complete SSMS Basic SQLCMD SQL Server PowerShell Policy Management Replication Integration Services Reporting Services Analysis Services Maintenance Plans SQL Server Agent SQL Server Profiler Data Collection Database Tuning Advisor
34
Recap Maximize Windows Server version Enterprise 64 bit Tune 32 bit
SQL Server Standard Edition
35
More Information SQL Aloha
Brad M. McGehee, Director of DBA Education, Red Gate Software DMV#4: Query Stats – Find the "top X" most expensive cached queries
36
More Information SQL Server 2008 Management Tools Basic vs Complete Explained....
37
Questions ??? LinkedIn PASS WIT Virtual Chapter PASS PNWSQL Chapter
Slides will be on SQL Saturday #68 site
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.