- SQL Server 2019 Administrator's Guide
- Marek Chmel Vladimi?r Muz?ny?
- 323字
- 2021-06-11 18:11:16
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:
- 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.
- 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.
- Hands-On Internet of Things with MQTT
- 7天精通Dreamweaver CS5網(wǎng)頁設(shè)計(jì)與制作
- HBase Design Patterns
- 快學(xué)Flash動畫百例
- Maya 2012從入門到精通
- PyTorch Deep Learning Hands-On
- Learning Azure Cosmos DB
- FPGA/CPLD應(yīng)用技術(shù)(Verilog語言版)
- 教育機(jī)器人的風(fēng)口:全球發(fā)展現(xiàn)狀及趨勢
- 從零開始學(xué)SQL Server
- 寒江獨(dú)釣:Windows內(nèi)核安全編程
- 生成對抗網(wǎng)絡(luò)項(xiàng)目實(shí)戰(zhàn)
- Learning Cassandra for Administrators
- Generative Adversarial Networks Projects
- JSP網(wǎng)絡(luò)開發(fā)入門與實(shí)踐