Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stephan Hurni Consultant Trivadis AG, SQL Server notes from the field.

Similar presentations


Presentation on theme: "Stephan Hurni Consultant Trivadis AG, SQL Server notes from the field."— Presentation transcript:

1 Stephan Hurni Consultant Trivadis AG, www.trivadis.com stephan.hurni@trivadis.com SQL Server notes from the field

2 … keep flexible Connect to SQL Server

3 SQL Server Browser service Is listening on port 1434 Responds with the ports of SQL instances to client requests Just holds instance names + ports of the local server Refreshes on every SQL Server instance startup Disable in secure envirionments SQL Server Browser service

4 SQL Server instance ports Dynamic or fixed but unique Bound to TCP/IP address Only one default instance or rather one 1433 What if applications can’t connect to dynamic ports You want to consolidate instances with default ports to a cluster or central SQL Server SQL Server instance port

5 Configure a fixed SQL Server port Use default port 1433 multiple times on same server If … every instance has a dedicated TCP/IP address Easy on a cluster  every instance must have a dedicated TCP/IP address For example (expected configuration) Server: sqlprod01–172.20.20.201 SQL instance: sql01 –172.20.20.211/1433 SQL instance: sql02 –172.20.20.212/1433 SQL Server fixed port – 1/2

6 SQL Browser list – if not configured correct sqlprod01\sql01  172.20.20.201\1433 sqlprod01\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 instances even on clustered instances Let clients and applications connect to the DNS names SQL Server fixed port – 2/2

7 SQL Server connections are easy and flexible using DNS names No “server\instance” combination must be set on clients or applications Multiple 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

8 SQL Server connections configuration demo…

9 … keep performance Windows Server …

10 Configure Windows accordingly for SQL Server Power options – neat behind ;-) Disk alignment – almost forgotten Storage throughput and waits  long-lasting discussion Policies lock pages in memory perform volume maintenance tasks Antivirus Windows/System power

11 Windows Server performance demo…

12 … keep control Databases are growing …

13 Configure autogrowth but Set correct values  beware of latches + timeouts To maintain proper and parallel growing on data files use traceflag 1117 For TXLog only Check for VLFs on Txlog files periodically to optimize Txlog growth Set max autogrowth to 1024MB Better: growth manually to achieve as less VLFs as possible but a single VLF not > 512MB … and never use autoshrink DB Setting autogrowth

14 Lots of TXLogs … Substantial performance reduction on data changes SQL Server must search for empty TXLog extents Backups will last longer Database startup will take much more time Recovery will last “for ever” Create database mirror ends in timeouts and mirroring can not establish TXLog penalties

15 Maintain your databases Backup Txlog to … Keep control on Txlog size  what about recovery modes Allow point in time recovery Disaster prevention Indexes Reorg / Rebuild Create missing and maybe remove unused Statistics Update regularly and planned Keep performance …

16 SQL Server file growing and VLFs demo…

17 Keep online Database migration

18 First check and identify business and operations requirements Use upgrade advisor http://msdn.microsoft.com/en-us/library/ms144256.aspx http://msdn.microsoft.com/en-us/library/ms144256.aspx Inplace upgrade vs new installation Check for pros and cons Check with your requirements Migration preparation

19 Backup / restore Retain a way back Copy large backup files Define exact point in time to migrate (disconnect clients) Detach / copy / attach Retain a way back Copy all data- + Txlog- files downtime Migration scenarios 1/2

20 Log shipping Source DB stay as it is Time gap Many steps involved in right order Less downtime Database mirroring Source DB stay as it is Easy to setup Transaction synchronous Allmost no downtime Migration scenarios 2/2

21 Database migration using mirroring demo…

22 Please help us make TechDays even better by Evaluating this Session. Thank you! Give us your feedback!

23 © 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.


Download ppt "Stephan Hurni Consultant Trivadis AG, SQL Server notes from the field."

Similar presentations


Ads by Google