Presentation is loading. Please wait.

Presentation is loading. Please wait.

Let’s Get It Started Lori Edwards, SQL Sentry. Introduction  Sales Engineer for SQL Sentry since 2/2013  Previously – DBA since 2003  PASS volunteer.

Similar presentations


Presentation on theme: "Let’s Get It Started Lori Edwards, SQL Sentry. Introduction  Sales Engineer for SQL Sentry since 2/2013  Previously – DBA since 2003  PASS volunteer."— Presentation transcript:

1 Let’s Get It Started Lori Edwards, SQL Sentry

2 Introduction  Sales Engineer for SQL Sentry since 2/2013  Previously – DBA since 2003  PASS volunteer  PASSion Award winner 2011  Email: ledwards@sqlsentry.netledwards@sqlsentry.net  Twitter: @loriedwards  Blog: http://blogs.sqlsentry.com/author/LoriEdwards/http://blogs.sqlsentry.com/author/LoriEdwards/  LinkedIn: www.linkedin.com/in/loriedwards/www.linkedin.com/in/loriedwards/ 2 | Let's Get It Started

3 Agenda  Preparing to install  Configuration  Post configuration  Unattended installations  Questions 3 | Let's Get It Started

4 Goals for this session  Understand when and why you might want to change configuration values  Create a method for repeatable installs  Create a process for server level documentation Let's Get It Started4 |

5 Preparing to Install Information to gather prior to install  Read application documentation or talk to your devs!!!  Update OS (service packs)  Collect service packs/cumulative updates 5 |Let's Get It Started

6 Installation  Service accounts  Preferably different accounts for each service  What kind of accounts should be used  Rights  Access  Windows or Mixed Mode Authentication  If Mixed Mode, set SA password  SQL Server administrators 6 |Let's Get It Started

7 Installation  Data and log file storage/Backup directories  Defaults to C:\Program Files\Microsoft SQL Server\ \MSSQL\  Ports  Default: 1433  Dynamic ports? Let's Get It Started7 |

8 Configuration  Now that your SQL Server is installed, let’s check some configurations  Run EXEC sp_configure to get current values  Ways to change configurations  SSMS instance properties  sp_configure Example:  Policy Based Management (PBM) Let's Get It Started8 |

9 Surface Area Configuration  Used to turn enable/disable features of SQL Server  Changed via PBM facets or sp_configure Let's Get It Started9 |

10 Surface Area Configuration (cont) Let's Get It Started10 |

11 Surface Area Configuration  Many of these features affect security  Includes:  AdHocRemoteQueries (aka Ad Hoc Distributed Queries)  XPCmdShell  ClrIntegration  OleAutomation  RemoteDac Let's Get It Started11 |

12 Enable the remote DAC  Dedicated Admin Connection  Allows remote connections to the server even if the server is non responsive  You may not ever need it, but if you do… 12 |Let's Get It Started

13 Memory settings  Minimum server memory  Default is 0  If minimum server memory isn’t available, SQL Server service won’t start  Maximum server memory  Default is 2147483647 MB(~2PB!) 13 |Let's Get It Started

14 Parallelism  Max Degree of Parallelism  Default is unlimited (0)  OPTION(MAXDOP) query hint  Cost Threshold for Parallelism  Default is 5  Tuning that number: http://sqlblog.com/blogs/jonathan_kehayias/archiv e/2010/01/19/tuning-cost-threshold-of-parallelism- from-the-plan-cache.aspx http://sqlblog.com/blogs/jonathan_kehayias/archiv e/2010/01/19/tuning-cost-threshold-of-parallelism- from-the-plan-cache.aspx 14 |Let's Get It Started

15 Collationsettings  Take a moment with this: Default is: SQL_Latin1_General_CP1_CI_AS  Differences in collation between user database and tempdb can cause issues 15 |Let's Get It Started

16 Optimize for Adhoc Workloads  Disabled by default  Plan use can be viewed in sys.cm_exec_cached_plans  Weigh difference between cost of compiles vs plan cache bloat 16 |Let's Get It Started

17 Instant File Initialization  Not technically a SQL Server configuration  Disabled by default  Available SQL Server 2005+ on Windows Server 2003+  Faster database creation and file growth  Transaction logs  Potential security risk.. 17 |Let's Get It Started

18 Backup Compression  Introduced 2008  Available in Standard Edition 2008R2  Not enabled by default  Free storage savings – why not? 18 |Let's Get It Started

19 VLFs  Not really a configuration setting  Set appropriate initial size and autogrowth settings http://www.sqlskills.com/blogs/kimberly/transaction- log-vlfs-too-many-or-too-few/  Algorithm for VLFs has changed in 2014 http://www.sqlskills.com/blogs/paul/important-change-vlf- creation-algorithm-sql-server-2014/  How to check? 19 |Let's Get It Started

20 TempDB  If possible, put on its own storage  Size appropriately based on growth  Number of files  >= 8 logical cores  Set number of files to number of logical cores  >8 logical cores  Set number of files to 8, increase by  Ensure that the files are equally sized 20 |Let's Get It Started

21 Indexes  Default index fill factor  Default = 0 (or none)  What/when/why  Resource impact  Pad Index  Not a server level setting  Only applies if fill factor is set Let's Get It Started21 |

22 Trace Flags  Trace flags are typically used for troubleshooting or correcting specific behavior, but…  TF 3226 – successful backup entries  TF 1117 – grow all tempdb files  TF 1118 – grow tempdb in full extents Let's Get It Started22 |

23 After completing set up and config  Set up database maintenance  Backups  Recovery model  SLAs  Ensure autogrowth settings are reasonable  Disable AUTO_SHRINK  Disable AUTO_CLOSE 23 |Let's Get It Started

24 After completing set up and config  Disable the SA account, if possible  SQL Agent Alerts  Severity level 19+  Agent alerts, 823, 824, 825  Anti virus exclusions Let's Get It Started24 |

25 After completing set up and config  Statistics  AUTO_CREATE_STATISTICS  For queried columns without statistics  AUTO_UPDATE_STATISTICS  Trace flag 2371 for very large tables  AUTO_UPDATE_STATISTICS_ASYNC 25 |Let's Get It Started

26 Documentation  Almost no one likes documentation – that’s a fact.  Make it a habit  Included script and form from this session Let's Get It Started26 |

27 Unattended installations  Saves time and keystrokes  Standardize!  Easy to hand off to others  Can install any features of SQL Server (SSRS, SSIS, SSAS) 27 |Let's Get It Started

28 Unattended installation command line  All settings are configured using parameters  Well over 100 possible parameters (look here: https://msdn.microsoft.com/en- us/library/ms144259.aspx ) https://msdn.microsoft.com/en- us/library/ms144259.aspx  Example:  setup.exe /q /ACTION=CompleteImage /INSTANCENAME=MYNEWINST /INSTANCEID= /SQLSVCACCOUNT=" " /SQLSVCPASSWORD=" " /SQLSYSADMINACCOUNTS=" " /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /IACCEPTSQLSERVERLICENSETERMS 28 |Let's Get It Started

29 Unattended installation w/ config file  I prefer using a config file  Can be found at C:\Program Files\Microsoft SQL Server\ \Setup Bootstrap\Log\ \ConfigurationFile.ini 29 |Let's Get It Started

30 Unattended installation w/ config file 30 |Let's Get It Started

31 Unattended installation w/ config file  Changes to the config file  Remove UIMODE  Change Quiet to “True”  Add IACCEPTSQLSERVERLICENSETERMS = “True” 31 |Let's Get It Started

32 Unattended installation w/ config file  Ensure any service accounts are set up prior  To run:  Path A = Path to SQL Server installation media  Path B = Path to configuration file  From cmd prompt:  /ConfigurationFile = “ ”  Example: C:\SQL\setup.exe /ConfigurationFile = “D:\config\ConfigurationFile.ini” 32 |Let's Get It Started

33 Summary At the end of this session, you should have learned:  What information to have on hand for an installation  Various configuration settings and when they would be appropriate to change  Steps to take post configuration  Perform unattended installs 33 | Let's Get It Started

34 Questions? Email me at ledwards@sqlsentry.netledwards@sqlsentry.net Or tweet me @loriedwards Thank you! 34 | Let's Get It Started

35 And your bonus for attending Let's Get It Started35 | Compilation of posts from SQLPerformance.com Email ebooks@sqlsentry.comebooks@sqlsentry.com or me ledwards@sqlsentry.com ledwards@sqlsentry.com

36 6/13/2015 Visit the Sponsor tables to enter their end of day raffles. Turn in your completed Event Evaluation form at the end of the day in the Registration area to be entered in additional drawings. Want more free training? Check out the Houston Area SQL Server User Group which meets on the 2 nd Tuesday of each month. Details at http://houston.sqlpass.org http://houston.sqlpass.org Thank You Sponsors!


Download ppt "Let’s Get It Started Lori Edwards, SQL Sentry. Introduction  Sales Engineer for SQL Sentry since 2/2013  Previously – DBA since 2003  PASS volunteer."

Similar presentations


Ads by Google