SQL Server 2017 Administration Inside out by William Assaf, Randolph West, Sven Aelterman, and Mindy Curnutt
Total Page:16
File Type:pdf, Size:1020Kb
SQL Server 2008 and 2008 R2 end of support is coming SQL Server 2008 and SQL Server 2008 R2 will no longer be supported by Microsoft starting in July 2019. Avoid challenges and vulnerabilities caused by end of support. Why should you upgrade? Mitigate risks with platform security and compliance There will be no access to critical security updates, opening the potential for business interruptions and loss of data. Upgrade to better cost efficiency Maintaining legacy servers, firewalls, intrusion systems, and other tools can get expensive quickly. Modernize to innovate Grow your environments with data, analytics and the cloud. More than an upgrade With SQL Server 2017 you don’t just get an update—you get in- SQL memory performance across workloads, mission-critical high availability, and built-in security features to help protect your data at rest and in motion. #1 OLTP performance1 #1 DW performance on 1TB2, 10TB3, and 30TB4 #1 OLTP price/performance5 #1 DW price/performance on 1TB2, 10TB3, and 30TB4 Learn more about SQL Server 2017 End of support options for SQL Server 2008 and 2008 R2 Take advantage of the Azure Extended Security Updates for Free Extended Security Updates Hybrid Benefit on-premises environments in Azure Save when you migrate your SQL Server 2008 Customers with Software Assurance or subscription Lift and shift your SQL Server 2008 workloads to or 2008 R2 workloads to Azure SQL Database licenses may purchase Extended Security Updates Azure with no application code changes. This with the Azure Hybrid Benefit for SQL Server. for three years of security updates for SQL Server gives you more time to plan for end of support. Learn more. 2008 and 2008 R2. Learn more. Learn more. Learn more about SQL Server 2008 and 2008 R2 end of support © 2018 Microsoft Corporation. All rights reserved. All TPC Claims as of 1/19/2018. 1http://www.tpc.org/4081; 2http://www.tpc.org/3331; 3http://www.tpc.org/3326; 4http://www.tpc.org/3321; 5http://www.tpc.org/4080 Keep learning from the inside out—and save! Save 50% when you purchase the complete eBook edition of SQL Server 2017 Administration Inside Out by William Assaf, Randolph West, Sven Aelterman, and Mindy Curnutt. Visit microsoftpressstore.com/SQLAdmin to select title and use code SQLADMIN during checkout to apply discount. The eBook is delivered in EPUB, PDF, and MOBI to read on your preferred device. Sign up to receive more special offers from Microsoft Press at microsoftpressstore.com/newsletters Discount code valid on eBook purchase from microsoftpressstore.com and cannot be combined with another offer. Microsoft Press products are published, marketed, and distributed by Pearson. SQL Server 2017 Administration Inside Out Second Edition William Assaf Randolph West Sven Aelterman Mindy Curnutt Published with the authorization of Microsoft Corporation by: Pearson Education, Inc. Copyright © 2018 by Pearson Education Inc. All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, request forms, and the appropriate contacts within the Pearson Education Global Rights & Permissions Department, please visit www.pearsoned.com/permissions/. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein. ISBN-13: 978-1-5093-0521-6 ISBN-10: 1-5093-0521-1 Library of Congress Control Number: 2017961300 Printed and bound in the United States of America. 1 18 Trademarks Microsoft and the trademarks listed at https://www.microsoft.com on the “Trademarks” webpage are trademarks of the Microsoft group of companies. All other marks are property of their respective owners. Warning and Disclaimer Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an “as is” basis. The authors, the publisher, and Microsoft Corporation shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or programs accompanying it. Special Sales For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at [email protected] or (800) 382-3419. For government sales inquiries, please contact [email protected]. For questions about sales outside the U.S., please contact [email protected]. Editor-in-Chief: Greg Wiegand Acquisitions Editor: Trina MacDonald Development Editor: Mark Renfrow Technical Editor: Louis Davidson Managing Editor: Sandra Schroeder Senior Project Editor: Tracey Croom Editorial Production: Octal Publishing, Inc. Copy Editor: Octal Publishing, Inc. Indexer: Octal Publishing, Inc. Proofreader: Octal Publishing, Inc. Cover Designer: Twist Creative, Seattle To David III for inspiring and enabling STEM careers for many, including my own. —William Assaf To Marinus and Trixie for putting up with the lies of “almost done,” and sharing my lap with a MacBook. —Randolph West To Ebony, Edward, and Sofia in recognition of their sacrifices, support, and endless love. —Sven Aelterman To Chris For believing in me more than I even believed in myself. —Mindy Curnutt This page intentionally left blank Contents at a glance Chapter 1 Chapter 8 Getting started with SQL Server tools . 1 Understanding and designing tables . .333 Chapter 2 Chapter 9 Introducing database server components . .45 Performance tuning SQL Server . 383 Chapter 3 Chapter 10 Designing and implementing a database Understanding and designing indexes . 429 infrastructure . .79 Chapter 11 infrastructure Developing, deploying, and managing data Chapter 4 recovery . 459 Provisioning databases . 127 Chapter 12 Chapter 5 Implementing high availability and disaster Provisioning Azure SQL Database . 197 recovery . 493 Chapter 6 Chapter 13 Administering security and permissions . 241 Managing and monitoring SQL Server . .557 Chapter 7 Chapter 14 Securing the server and its data . 291 Automating SQL Server administration . 607 v This page intentionally left blank Table of contents Foreword . xvii Introduction . xix Who this book is for .................................................................xix Assumptions about you ........................................................xix How this book is organized . xx About the companion content ......................................................xxii Acknowledgments..................................................................xxii Support and feedback ..............................................................xxiv Errata & support..............................................................xxiv Stay in touch .................................................................xxiv Chapter 1 Getting started with SQL Server tools . 1 SQL Server setup . 1 Installing SQL Server by using the Installation Center .............................2 Planning before an upgrade or installation.......................................3 Installing or upgrading SQL Server ..............................................6 Tools and services installed with the SQL Server Database Engine . .7 Machine Learning Services ......................................................7 Data Quality Services ...........................................................7 Command-line interface . 9 SQL Server Configuration Manager ..............................................11 Performance and reliability monitoring tools..........................................12 Database Engine Tuning Advisor ...............................................12 Extended events...............................................................13 Management data warehouse..................................................15 SQL Server Reporting Services .......................................................18 Installation . 19 Report Services Configuration Manager ........................................20 vii viii Table of contents SQL Server Management Studio......................................................21 Releases and versions ..........................................................21 Installing SQL Server Management Studio ......................................22 Upgrading SQL Server Management Studio.....................................22 Features of SQL Server Management Studio.....................................23 Additional tools in SQL Server Management Studio . .29 Error logs .....................................................................32 Activity Monitor ...............................................................33 SQL Server Agent..............................................................37 SQL Server Data Tools ...............................................................41 SQL Server Integration Services ................................................41 A note on deprecation ..............................................................44