Presentation is loading. Please wait.

Presentation is loading. Please wait.

Virtual techdays INDIA │ 28-30 September 2011 Tips for Successful SQL Server Deployment in Enterprise Environment Balmukund Lakhani │ Technical Lead –

Similar presentations


Presentation on theme: "Virtual techdays INDIA │ 28-30 September 2011 Tips for Successful SQL Server Deployment in Enterprise Environment Balmukund Lakhani │ Technical Lead –"— Presentation transcript:

1 virtual techdays INDIA │ 28-30 September 2011 Tips for Successful SQL Server Deployment in Enterprise Environment Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft blakhani@microsoft.comblakhani@microsoft.com | http://SQLServer-Help.com |http://SQLServer-Help.com

2 virtual techdays INDIA │ 28-30 September 2011 A B O U T M E… Working with SQL Technology since 2001 (almost 10 years) Currently working as Technical Lead with Microsoft SQL Support Team Premier Field Engineer @ Microsoft ERP Onsite Support @ Ramco Systems DBA @ Ramco Systems Developer @ Ramco Systems Team Blog – http://blogs.msdn.com/SQLServerFAQhttp://blogs.msdn.com/SQLServerFAQ Personal Blog – http://SQLServer-Help.comhttp://SQLServer-Help.com Active Participant in MSDN SQL Forums.

3  Best Practices or Good Practices or Better Practices?  Installation  Memory  Security  Database Files  TempDB Files Placement  Backup  Monitoring SQL Server virtual techdays INDIA │ 28-30 September 2011 S E S S I O N A G E N D A

4 virtual techdays INDIA │ 28-30 September 2011 Good Practices around Installation/Patching of SQL Server

5 virtual techdays INDIA │ 28-30 September 2011 SQL Server Installation/Patching Tricks Use domain account (not domain admin) as Service Account. Have separate account for each server. If you install SQL 2005, please remember to install non-cluster aware component on both nodes. SQL 2008 Onwards, use Slip Streamed media – Avoid known issue of setup itself. – Overall reduced time to install SQL Server. SQL 2008 onwards, first apply patch on passive node in cluster (rolling upgrade), failover and then apply on active node. Provide “Perform Volume Maintenance Tasks” permission (using SecPol.msc) to service account. Use Configuration File / Command line install for faster deployment. Configure antivirus software to skip LDF/MDF/NDF/Backup files (KB 309422) Make sure ReadMe of release is followed to understand the known issues in advance. Evaluation Edition Expired?

6 virtual techdays INDIA │ 28-30 September 2011 Good Practices around Memory Settings of SQL Server

7 virtual techdays INDIA │ 28-30 September 2011 SQL Server Memory Configuration Tricks If you are using 32 bit SQL Server and you have more than 2 GB of RAM, please configure AWE if you want more memory to be used. To use AWE, SQL Service account needs “Lock Pages in Memory” privilege. Limit Max Server Memory of SQL Server. Keep an eye on DBCC MemoryStatus output. Don’t use Task Manager to check how much memory SQL is using. Use PerfMon.

8 virtual techdays INDIA │ 28-30 September 2011 Good Practices around Security in SQL Server

9 virtual techdays INDIA │ 28-30 September 2011 SQL Server Security Tips Change Production Server Port to something other than 1433. Don’t add SQL Server Service Account as SysAdmin. Make sure permission is given to those who need it. Rename sa to some other name. Keep strong passwords for SQL Logins. Don’t add unwanted users to SQL Server. Remove Builtin\Administrators Disable xp_cmdshell unless it is absolutely needed. Use Windows Authentication where ever possible.

10 virtual techdays INDIA │ 28-30 September 2011 Demo Recover from a locked out situation

11 virtual techdays INDIA │ 28-30 September 2011 Good Practices around Database Files

12 virtual techdays INDIA │ 28-30 September 2011 SQL Server Database Files Tips Multiple Transaction Logs file won’t help in performance. Don’t Shrink the data files to save space unless it’s the last thing in the world! Don’t let the file grow automatically. Plan in advance. Don’t have AutoShrink of database turned ON – worst than performing manual shrink. Don’t have AutoClose ON for the database. Avoid having percentage growth. Fix size is better. Frequent Autogrowth is not healthy. Don’t Scan the files by Antivirus.

13 virtual techdays INDIA │ 28-30 September 2011 Demo Problem caused due to Many VLFs & Shrink is an E V I L

14 virtual techdays INDIA │ 28-30 September 2011 Good Practices around TempDB Files

15 virtual techdays INDIA │ 28-30 September 2011 SQL Server TempDB Managament How may tempdb database we have? There are multiple suggestions around how many tempdb data files. If you see any contention on PAGELATCH then increase the tempdb files. Track tempdb usage and make sure that drive has enough space to allow growth. If there are multiple temdpb data files, make sure the size is same.

16 virtual techdays INDIA │ 28-30 September 2011 Good Practices around Monitoring

17 virtual techdays INDIA │ 28-30 September 2011 SQL Server Monitoring Automate as much as you can. Alert for long Blocking Alert for Data File Free Space. Alert for High CPU Usage. Be proactive Check ErrorLog regularly. Check for Dumps. Use DDL Triggers on production to avoid any mishap of dropping objects. Install Performance DashBoard on Servers to look in graphical DMVs output. Use SSMS colour feature to make sure you are working on proper server.

18 virtual techdays INDIA │ 28-30 September 2011 Demo SQL Server Management Studio Status Bar Color & DDL Trigger to avoid accidents

19 virtual techdays INDIA │ 28-30 September 2011 And … have a solid maintenance plans.

20 virtual techdays INDIA │ 28-30 September 2011 SQL Server Maintenance Plan tips Don’t blindly update stats for all table and rebuild all indexes. Check with Business Unit about tables and their data change frequency. Check the RTO and RPO from business to decide backup frequency. If recovery model is full, make sure log backups are taken.. Please! Please!! Please!!! Don’t ever have shrink in the Maintenance Plan. Myth – If backup is successful, backup file is restorable. Check database integrity (DBCC CheckDB) on regular basis. Have a sound disaster recovery plan! And make sure you test the plan before you actually do it.

21 virtual techdays INDIA │ 28-30 September 2011 Puzzle Time!

22 virtual techdays INDIA │ 28-30 September 2011 Puzzle Full backup 1 (12:00 PM) T-Log backup 1 (1:00 PM) T-Log backup 2 (2:00 PM) T-Log backup 3 (3:00 PM) Full backup 2 (3:25 PM) T-Log backup 4 (3:35 PM) 03:22 PM

23 virtual techdays INDIA │ 28-30 September 2011 RELATED CONTENT in VTD Sep 29 th 2011 – DBA Track  Ancient Trade of Performance Tuning - Index, Beyond Index and No Index  Pinal Dave  11:45am - 12:45pm  High Availability - A Story from Past to Future  Balmukund Lakhani  1:45pm - 2:45pm  Monitoring Performance in Cloud for SQL Azure Applications  Vinod Kumar  3:00pm - 4:00pm  Managing SQL Server Made Easy - Features and Concepts  Amit Banerjee  4:15pm - 5:15pm

24 virtual techdays THANKS │ 28-30 September 2011 Please do give your Feedback, Complete evaluation at the end of this session. You could also write to be at : blakhani@microsoft.comblakhani@microsoft.com │ http:// twitter.com/blakhanihttp:// twitter.com/blakhani


Download ppt "Virtual techdays INDIA │ 28-30 September 2011 Tips for Successful SQL Server Deployment in Enterprise Environment Balmukund Lakhani │ Technical Lead –"

Similar presentations


Ads by Google