Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying SQL Server 2019 Administrator's Guide
  • Table Of Contents Toc
SQL Server 2019 Administrator's Guide

SQL Server 2019 Administrator's Guide - Second Edition

By : Marek Chmel , Vladimír Mužný
4.4 (10)
close
close
SQL Server 2019 Administrator's Guide

SQL Server 2019 Administrator's Guide

4.4 (10)
By: Marek Chmel , Vladimír Mužný

Overview of this book

SQL Server is one of the most popular relational database management systems developed by Microsoft. This second edition of the SQL Server Administrator's Guide will not only teach you how to administer an enterprise database, but also help you become proficient at managing and keeping the database available, secure, and stable. You’ll start by learning how to set up your SQL Server and configure new and existing environments for optimal use. The book then takes you through designing aspects and delves into performance tuning by showing you how to use indexes effectively. You’ll understand certain choices that need to be made about backups, implement security policy, and discover how to keep your environment healthy. Tools available for monitoring and managing a SQL Server database, including automating health reviews, performance checks, and much more, will also be discussed in detail. As you advance, the book covers essential topics such as migration, upgrading, and consolidation, along with the techniques that will help you when things go wrong. Once you’ve got to grips with integration with Azure and streamlining big data pipelines, you’ll learn best practices from industry experts for maintaining a highly reliable database solution. Whether you are an administrator or are looking to get started with database administration, this SQL Server book will help you develop the skills you need to successfully create, design, and deploy database solutions.
Table of Contents (17 chapters)
close
close
1
Section 1: Provisioning the SQL Server Environment
4
Section 2: Server and Database Maintenance
9
Section 3: High Availability and the Cloud with SQL Server 2019

Installing SQL Server 2019 on containers

Virtualization of computers hosting SQL Server is very common nowadays. Containers provide the next level of virtualization. A container itself is a lightweight computer hosted by the container environment. The question is: why use containers over virtual machines? Containers provide a simple way to prepare the environment that is often destroyed or moved between hosts. It is useful, for instance, during the development phase, when developers need to refresh their server environment frequently.

The basis of containers adopted by Microsoft lies on a Linux-based technology called Docker. It's also a prerequisite when we'd like to try provisioning. We need to have Docker Engine 1.8 or higher installed on our Linux computer, or we can install Docker for Windows as well.

Note

Installing Docker for Windows needs the Hyper-V feature of Windows installed, because Docker itself is then running on the Linux VM.

The provisioning of SQL Server to containers is a scripting task. We can use bash or PowerShell, depending on the hosting environment. The following walkthrough example will provision SQL Server on Docker for Windows, so all commands are written using PowerShell:

  1. As a first step, the SQL Server 2019 container image is downloaded from the Docker Hub with the following command:
    docker run -e "ACCEPT-EULA=Y" -e "SA_PASSWORD=<strong enough password>" -p 1433:1433 -d "mcr.microsoft.com/mssql/server:2019-CU3-ubuntu-18.04"

    The preceding command downloads the image to the local computer. Consider the following facts:

    a) The SA_PASSWORD parameter must follow the SQL Server default password policy (at least eight characters, special symbols, and numbers). Otherwise, the installation fails.

    b) The -d command parameter allows different versions of the SQL Server image to be selected. All images are accessible at https://hub.docker.com/_/microsoft-mssql-server.

  2. We can check the list of all downloaded containers using the following command:
    docker ps -a

If we see our SQL Server container in the list retrieved by the preceding command, we can connect the SQL Server instance using any of our preferred tools.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
SQL Server 2019 Administrator's Guide
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon