Upload
elisabeth-briggs
View
216
Download
3
Tags:
Embed Size (px)
Citation preview
Stephan HurniConsultantTrivadis AG, www.trivadis.com [email protected]
SQL Servernotes from the field
… keep flexible
Connect to SQL Server
SQL Server Browser serviceIs listening on port 1434Responds with the ports of SQL instances to client requestsJust holds instance names + ports of the local serverRefreshes on every SQL Server instance startupDisable in secure envirionments
SQL Server Browser service
SQL Server instance portsDynamic or fixed but uniqueBound to TCP/IP addressOnly one default instance or rather one 1433
What if applications can’t connect to dynamic portsYou want to consolidate instances with default ports to a cluster or central SQL Server
SQL Server instance port
Configure a fixed SQL Server portUse default port 1433 multiple times on same server
If … every instance has a dedicated TCP/IP addressEasy on a cluster every instance must have a dedicated TCP/IP address
For example (expected configuration)Server: sqlprod01–172.20.20.201SQL instance: sql01 –172.20.20.211/1433SQL instance: sql02 –172.20.20.212/1433
SQL Server fixed port – 1/2
SQL Browser list – if not configured correctsqlprod01\sql01 172.20.20.201\1433sqlprod01\sql02 172.20.20.201\1433 uups!Use configuration manager
Set port to 1433 and dedicated TCP/IP address to listen on
Use DNS names to publish SQL instanceseven on clustered instancesLet clients and applications connect to the DNS names
SQL Server fixed port – 2/2
SQL Server connections are easy and flexible using DNS names
No “server\instance” combination must be set on clients or applicationsMultiple instances with “default behaviour” can exist on same server Instance migrations from one to another server are then easier no client or application customizing Upcoming SQL Server Denali will use a similar behaviour on availability groups
Configure SQL connections
SQL Server connections configuration
demo…
… keep performance
Windows Server …
Configure Windows accordingly for SQL Server
Power options – neat behind ;-) Disk alignment – almost forgottenStorage throughput and waits long-lasting discussionPolicieslock pages in memoryperform volume maintenance tasksAntivirus
Windows/System power
Windows Serverperformance
demo…
… keep control
Databases are growing …
Configure autogrowth butSet correct values beware of latches + timeoutsTo maintain proper and parallel growing on data files use traceflag 1117
For TXLog onlyCheck for VLFs on Txlog files periodically to optimize Txlog growthSet max autogrowth to 1024MBBetter: growth manually to achieveas less VLFs as possible but a single VLF not > 512MB
… and never use autoshrink
DB Setting autogrowth
Lots of TXLogs …Substantial performance reduction
on data changes SQL Server must search for empty TXLog extentsBackups will last longerDatabase startup will take much more timeRecovery will last “for ever”
Create database mirror ends in timeouts and mirroring can not establish
TXLog penalties
Maintain your databasesBackup Txlog to …
Keep control on Txlog size what about recovery modesAllow point in time recoveryDisaster prevention
IndexesReorg / RebuildCreate missing and maybe remove unused
StatisticsUpdate regularly and planned
Keep performance …
SQL Serverfile growing and VLFs
demo…
Please help us make TechDays even better by Evaluating this Session. Thank you!
Give us your feedback!
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.