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 2017 Administration Inside out by William Assaf, Randolph West, Sven Aelterman, and Mindy Curnutt 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
Recommended publications
  • Aptum Database Administration Program September 2019 Overview
    SERVICE GUIDE APTUM DATABASE ADMINISTRATION PROGRAM SEPTEMBER 2019 OVERVIEW Aptum’s Database Administration (DBA) Program was designed to DBA Plan hours can be leveraged for all database-related activities help our customers reduce the cost of normal operation and the risk of detailed within this document, up to the allocation purchased. If you application and database downtime. require more hours than are purchased in a plan for a given month, any excess will be billed on an hourly basis at the standard Database Customers can work with Aptum’s Solutions Engineers and Certified Administration rate. Database Administrators to obtain assistance with everything from database engine configuration, performance optimization, clustering Included Database Platforms: administration, and replication administration. Microsoft SQL Server To help you achieve your performance goals, we offer our DBA plans in MySQL/MariaDB/Percona block-hour increments: 4 hours* * Hours are monthly and renew at the 1st of each calendar month and do not roll over. Overage rates are applicable only after block hours are consumed. All hours are 8 hours* applicable to the entire solution not per server. 12 hours* 20 hours* THE NEED FOR DATABASE ADMINISTRATION Most applications—especially those that support enterprise processes enable e-commerce, or facilitate collaboration—are database-intensive and demand optimal performance from the database. Applications and database queries may utilize very lean and elegant code, but the structure and configuration of your databases can be a detriment to high performance. There are dozens, sometimes hundreds, of configuration settings that need to be optimally tuned to enhance database performance. When the database is installed, most configuration defaults are applied automatically.
    [Show full text]
  • SAQE: Practical Privacy-Preserving Approximate Query Processing for Data Federations
    SAQE: Practical Privacy-Preserving Approximate Query Processing for Data Federations Johes Bater Yongjoo Park Xi He Northwestern University University of Illinois (UIUC) University of Waterloo [email protected] [email protected] [email protected] Xiao Wang Jennie Rogers Northwestern University Northwestern University [email protected] [email protected] ABSTRACT 1. INTRODUCTION A private data federation enables clients to query the union of data Querying the union of multiple private data stores is challeng- from multiple data providers without revealing any extra private ing due to the need to compute over the combined datasets without information to the client or any other data providers. Unfortu- data providers disclosing their secret query inputs to anyone. Here, nately, this strong end-to-end privacy guarantee requires crypto- a client issues a query against the union of these private records graphic protocols that incur a significant performance overhead as and he or she receives the output of their query over this shared high as 1,000× compared to executing the same query in the clear. data. Presently, systems of this kind use a trusted third party to se- As a result, private data federations are impractical for common curely query the union of multiple private datastores. For example, database workloads. This gap reveals the following key challenge some large hospitals in the Chicago area offer services for a cer- in a private data federation: offering significantly fast and accurate tain percentage of the residents; if we can query the union of these query answers without compromising strong end-to-end privacy. databases, it may serve as invaluable resources for accurate diag- To address this challenge, we propose SAQE, the Secure Ap- nosis, informed immunization, timely epidemic control, and so on.
    [Show full text]
  • Veritas: Shared Verifiable Databases and Tables in the Cloud
    Veritas: Shared Verifiable Databases and Tables in the Cloud Lindsey Alleny, Panagiotis Antonopoulosy, Arvind Arasuy, Johannes Gehrkey, Joachim Hammery, James Huntery, Raghav Kaushiky, Donald Kossmanny, Jonathan Leey, Ravi Ramamurthyy, Srinath Settyy, Jakub Szymaszeky, Alexander van Renenz, Ramarathnam Venkatesany yMicrosoft Corporation zTechnische Universität München ABSTRACT A recent class of new technology under the umbrella term In this paper we introduce shared, verifiable database tables, a new "blockchain" [11, 13, 22, 28, 33] promises to solve this conundrum. abstraction for trusted data sharing in the cloud. For example, companies A and B could write the state of these shared tables into a blockchain infrastructure (such as Ethereum [33]). The KEYWORDS blockchain then gives them transaction properties, such as atomic- ity of updates, durability, and isolation, and the blockchain allows Blockchain, data management a third party to go through its history and verify the transactions. Both companies A and B would have to write their updates into 1 INTRODUCTION the blockchain, wait until they are committed, and also read any Our economy depends on interactions – buyers and sellers, suppli- state changes from the blockchain as a means of sharing data across ers and manufacturers, professors and students, etc. Consider the A and B. To implement permissioning, A and B can use a permis- scenario where there are two companies A and B, where B supplies sioned blockchain variant that allows transactions only from a set widgets to A. A and B are exchanging data about the latest price for of well-defined participants; e.g., Ethereum [33]. widgets and dates of when widgets were shipped.
    [Show full text]
  • Windows 10 Enterprise E3 in CSP - Windows Deployment | Microsoft Docs
    07/01/2020 Windows 10 Enterprise E3 in CSP - Windows Deployment | Microsoft Docs Windows 10 Enterprise E3 in CSP 08/23/2017 • 16 minutes to read • +5 In this article Compare Windows 10 Pro and Enterprise editions Deployment of Windows 10 Enterprise E3 licenses Deploy Windows 10 Enterprise features Related topics Windows 10 Enterprise E3 launched in the Cloud Solution Provider (CSP) channel on September 1, 2016. Windows 10 Enterprise E3 in CSP is a new offering that delivers, by subscription, exclusive features reserved for Windows 10 Enterprise edition. This offering is available through the Cloud Solution Provider (CSP) channel via the Partner Center as an online service. Windows 10 Enterprise E3 in CSP provides a flexible, per- user subscription for small- and medium-sized organizations (from one to hundreds of users). To take advantage of this offering, you must have the following: Windows 10 Pro, version 1607 (Windows 10 Anniversary Update) or later, installed and activated, on the devices to be upgraded Azure Active Directory (Azure AD) available for identity management Starting with Windows 10, version 1607 (Windows 10 Anniversary Update), you can move from Windows 10 Pro to Windows 10 Enterprise more easily than ever before— no keys and no reboots. After one of your users enters the Azure AD credentials associated with a Windows 10 Enterprise E3 license, the operating system turns from Windows 10 Pro to Windows 10 Enterprise and all the appropriate Windows 10 Enterprise features are unlocked. When a subscription license expires or is transferred to another user, the Windows 10 Enterprise device seamlessly steps back down to Windows 10 Pro.
    [Show full text]
  • Damage Management in Database Management Systems
    The Pennsylvania State University The Graduate School Department of Information Sciences and Technology Damage Management in Database Management Systems A Dissertation in Information Sciences and Technology by Kun Bai °c 2010 Kun Bai Submitted in Partial Ful¯llment of the Requirements for the Degree of Doctor of Philosophy May 2010 The dissertation of Kun Bai was reviewed and approved1 by the following: Peng Liu Associate Professor of Information Sciences and Technology Dissertation Adviser Chair of Committee Chao-Hsien Chu Professor of Information Sciences and Technology Thomas La Porta Distinguished Professor of Computer Science and Engineering Sencun Zhu Assistant Professor of Computer Science and Engineering Frederico Fonseca Associate Professor of Information Sciences and Technology Associate Dean, College of Information Sciences and Technology 1Signatures on ¯le in the Graduate School. iii Abstract In the past two decades there have been many advances in the ¯eld of computer security. However, since vulnerabilities cannot be completely removed from a system, successful attacks often occur and cause damage to the system. Despite numerous tech- nological advances in both security software and hardware, there are many challenging problems that still limit e®ectiveness and practicality of existing security measures. As Web applications gain popularity in today's world, surviving Database Man- agement System (DBMS) from an attack is becoming even more crucial than before because of the increasingly critical role that DBMS is playing in business/life/mission- critical applications. Although signi¯cant progress has been achieved to protect the DBMS, such as the existing database security techniques (e.g., access control, integrity constraint and failure recovery, etc.,), the buniness/life/mission-critical applications still can be hit due to some new threats towards the back-end DBMS.
    [Show full text]
  • ACID, Transactions
    ECE 650 Systems Programming & Engineering Spring 2018 Database Transaction Processing Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) Transaction Processing Systems • Systems with large DB’s; many concurrent users – As a result, many concurrent database transactions – E.g. Reservation systems, banking, credit card processing, stock markets, supermarket checkout • Need high availability and fast response time • Concepts – Concurrency control and recovery – Transactions and transaction processing – ACID properties (desirable for transactions) – Schedules of transactions and recoverability – Serializability – Transactions in SQL 2 Single-User vs. Multi-User • DBMS can be single-user or multi-user – How many users can use the system concurrently? – Most DBMSs are multi-user (e.g. airline reservation system) • Recall our concurrency lectures (similar issues here) – Multiprogramming – Interleaved execution of multiple processes – Parallel processing (if multiple processor cores or HW threads) A A B B C CPU1 D CPU2 t1 t2 t3 t4 time Interleaved concurrency is model we will assume 3 Transactions • Transaction is logical unit of database processing – Contains ≥ 1 access operation – Operations: insertion, deletion, modification, retrieval • E.g. things that happen as part of the queries we’ve learned • Specifying database operations of a transaction: – Can be embedded in an application program – Can be specified interactively via a query language like SQL – May mark transaction boundaries by enclosing operations with: • “begin transaction” and “end transaction” • Read-only transaction: – No database update operations; only retrieval operations 4 Database Model for Transactions • Database represented as collection of named data items – Size of data item is its “granularity” – E.g. May be field of a record (row) in a database – E.g.
    [Show full text]
  • Surface Hub 2S Admin Guide
    Surface Hub 2S Admin Guide Surface Hub 2S coming soon; Pre-release products shown; products and features subject to regulatory certification/approval, may change, and may vary by country/region. Surface Hub 2S has not yet been authorized under U.S. Federal Communications Commission (FCC) rules; actual sale and delivery is contingent on compliance with applicable FCC requirements. This documentation is an early release of the final documentation, which may be changed prior to final commercial release and is confidential and proprietary information of Microsoft Corporation. This document is provided for informational purposes only and Microsoft makes no warranties, either express or implied, in this document. © 2019. Microsoft Corporation. All rights reserved Introduction .................................................................................................................................................. 1 Welcome to Surface Hub 2S ......................................................................................................................... 1 New User Experience and Features ........................................................................................................................ 1 Microsoft Teams ..................................................................................................................................................... 1 New form factor and hardware changes ................................................................................................................ 2 Surface
    [Show full text]
  • Cohesity Dataplatform Protecting Individual MS SQL Databases Solution Guide
    Cohesity DataPlatform Protecting Individual MS SQL Databases Solution Guide Abstract This solution guide outlines the workflow for creating backups with Microsoft SQL Server databases and Cohesity Data Platform. Table of Contents About this Guide..................................................................................................................................................................2 Intended Audience..............................................................................................................................................2 Configuration Overview.....................................................................................................................................................2 Feature Overview.................................................................................................................................................................2 Installing Cohesity Windows Agent..............................................................................................................................2 Downloading Cohesity Agent.........................................................................................................................2 Select Coheisty Windows Agent Type.........................................................................................................3 Install the Cohesity Agent.................................................................................................................................3 Cohesity Agent Setup........................................................................................................................................4
    [Show full text]
  • SQL Database Management Portal
    APPENDIX A SQL Database Management Portal This appendix introduces you to the online SQL Database Management Portal built by Microsoft. It is a web-based application that allows you to design, manage, and monitor your SQL Database instances. Although the current version of the portal does not support all the functions of SQL Server Management Studio, the portal offers some interesting capabilities unique to SQL Database. Launching the Management Portal You can launch the SQL Database Management Portal (SDMP) from the Windows Azure Management Portal. Open a browser and navigate to https://manage.windowsazure.com, and then login with your Live ID. Once logged in, click SQL Databases on the left and click on your database from the list of available databases. This brings up the database dashboard, as seen in Figure A-1. To launch the management portal, click the Manage icon at the bottom. Figure A-1. SQL Database dashboard in Windows Azure Management Portal 257 APPENDIX A N SQL DATABASE MANAGEMENT PORTAL N Note You can also access the SDMP directly from a browser by typing https://sqldatabasename.database. windows.net, where sqldatabasename is the server name of your SQL Database. A new web page opens up that prompts you to log in to your SQL Database server. If you clicked through the Windows Azure Management Portal, the database name will be automatically filled and read-only. If you typed the URL directly in a browser, you will need to enter the database name manually. Enter a user name and password; then click Log on (Figure A-2).
    [Show full text]
  • CSIT 1810 Introduction to Database Design
    PELLISSIPPI STATE COMMUNITY COLLEGE MASTER SYLLABUS INTRODUCTION TO DATABASE DESIGN CSIT 1810 Class Hours: 3.0 Credit Hours: 4.0 Laboratory Hours: 3.0 Date Revised: Spring 2016 Catalog Course Description: A study of database management systems and their impact on information technology. Topics include database models, data modeling techniques, conceptual and physical design, storage techniques and data administration. Special emphasis will be placed on relational systems and application of query languages using relational operations. Entry Level Standards: The entering student should have a familiarity with the Windows environment. The student is expected to have moderate programming abilities in a high-level language or a scripting language. Problem solving skills will be essential. The student must have math, writing, verbal and English language skills at the college level. Prerequisites: CSIT 1110 or WEB 2010 Textbook(s) and Other Course Materials: Textbook: Database Systems: Design, Implementation and Management; (11th. Edition), by Coronel/Morris/Rob, Cengage, 2014, ISBN-13 978-1-285-19614-5, (Electronic Book at www.cengagebrain.com, ISBN-13 9781305323230.) Supplies: USB flash drive; ear buds or head phones for audio tutorials I. Week/Unit/Topic Basis: Week Chapter Topic 1 1 Database Systems 2 2 Database Models; Relational versus NoSQL databases 3 3 The Relational Database Model 4 9 Introduction to Systems & Database Design 5, 6 4, 5.1 Entity-Relationship Modeling 7 6 Normalization 8-10 7, SQL Queries, Creating Tables and Views in SQL 8.1,8.4 11 10 Transaction Management and Concurrency Control 12 12, 15 Distributed Systems, Database Management & Security 13 13 Business Intelligence & Data Warehouses 14 13 Big Data; final exam review 15 Final Exam II.
    [Show full text]
  • Django-Transaction-Hooks Documentation Release 0.2.1.Dev1
    django-transaction-hooks Documentation Release 0.2.1.dev1 Carl Meyer December 12, 2016 Contents 1 Prerequisites 3 2 Installation 5 3 Setup 7 3.1 Using the mixin.............................................7 4 Usage 9 4.1 Notes...................................................9 5 Contributing 13 i ii django-transaction-hooks Documentation, Release 0.2.1.dev1 A better alternative to the transaction signals Django will never have. Sometimes you need to fire off an action related to the current database transaction, but only if the transaction success- fully commits. Examples: a Celery task, an email notification, or a cache invalidation. Doing this correctly while accounting for savepoints that might be individually rolled back, closed/dropped connec- tions, and idiosyncrasies of various databases, is non-trivial. Transaction signals just make it easier to do it wrong. django-transaction-hooks does the heavy lifting so you don’t have to. Contents 1 django-transaction-hooks Documentation, Release 0.2.1.dev1 2 Contents CHAPTER 1 Prerequisites django-transaction-hooks supports Django 1.6.x through 1.8.x on Python 2.6, 2.7, 3.2, 3.3 and 3.4. django-transaction-hooks has been merged into Django 1.9 and is now a built-in feature, so this third-party library should not be used with Django 1.9+. SQLite3, PostgreSQL (+ PostGIS), and MySQL are currently the only databases with built-in support; you can exper- iment with whether it works for your favorite database backend with just a few lines of code. 3 django-transaction-hooks Documentation, Release 0.2.1.dev1 4 Chapter 1.
    [Show full text]
  • Transactions.Pdf
    BIT 4514: Database Technology for Business Fall 2019 Database transactions 1 1 Database transactions • A database transaction is any (possibly multi-step) action that reads from and/or writes to a database – It may consist of a single SQL statement or a collection of related SQL statements ex: Adding a new lunch to the class database – requires two related INSERT statements 2 2 Transactions (cont.) • A successful transaction is one in which all of the SQL statements are completed successfully – A consistent database state is one in which all data integrity constraints are satisfied – A successful transaction changes the database from one consistent state to another 3 3 1 Transaction management • Improper or incomplete transactions can have a devastating effect on database integrity Ex: INSERT only items into the Lunch_item table • If a DBMS supports transaction management, it will roll back an inconsistent database (i.e., the result of an unsuccessful transaction) to a previous consistent state. 4 4 Properties of a transaction • Atomicity • Consistency • Isolation • Durability • Every transaction MUST exhibit these four properties 5 5 Properties of a transaction • Atomicity – The "all or nothing" property – All transaction operations must be completed i.e. a transaction is treated as a single, indivisible, logical unit of work • Consistency – When a transaction is completed, the database must be in a consistent state 6 6 2 Properties of a transaction • Isolation – Data used during the execution of a transaction cannot be used by a second
    [Show full text]