SQL Server 2019 on Linux Containers

-> Connect to a Red Hat Enterprise Linux 8 Azure Virtual machine using Putty,

Blog93_1

-> Enable Docker CE Repository,

Sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
Blog93_2

-> Install Docker CE using dnf command,

sudo dnf list docker-ce
sudo dnf install docker-ce --nobest -y
Blog93_3
Blog93_4

-> After installation, Start and enable docker service,

sudo systemctl start docker
sudo systemctl enable docker
docker --version
Blog93_5

-> Pull the SQL Server 2019 image,

sudo docker pull mcr.microsoft.com/mssql/server:2019-latest
Blog93_6
Blog93_7

-> Execute the container,

sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Pa$$w0rd1*=Pa$$w0rd1*" \
-p 1433:1433 --name jb-prd-sql1 \
-d mcr.microsoft.com/mssql/server:2019-latest
Blog93_8

-> Verify the container,

sudo docker ps -a
Blog93_9

-> Enter the container,

sudo docker exec -it jb-prd-sql1 "bash"
Blog93_10

-> Connect to SQL Server Instance,

/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "Pa$$w0rd1*=Pa$$w0rd1*"

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.

SQL Server 2019 on Redhat Linux

-> SQL Server 2019 installation will be performed on a Redhat Azure Virtual Machine.

-> Provisioning a Red Hat Enterprise Linux 8 Azure Virtual machine.

Blog92_1
Blog92_2
Blog92_3

-> NIC network security group will be set to None as this is a test instance. Appropriate configuration will be required for production server.

Blog92_5
Blog92_6
Blog92_7
Blog92_8

-> Install Putty from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html to login to the provisioned Virtual Machine and start the SQL Server 2019 Install.

-> From Azure portal open the virtual machine provisioned and click on connect. Make sure SSH tab is selected. Public IP address in the SSH tab will be used in the putty session to connect to the provisioned Virtual Machine,

Blog92_9
Blog92_10

-> Below command can be used to download Microsoft SQL Server 2019 Red Hat repository configuration file,

sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/8/mssql-server-2019.repo
Blog92_11
Blog92_12

-> Below command will be used to install SQL Server,

sudo yum install -y mssql-server
Blog92_13
Blog92_14

-> After package installation, execute below command to set SA password and slect appropriate edition,

sudo /opt/mssql/bin/mssql-conf setup
Blog92_15

-> Below command can be used to check the status of installed SQL Server,

systemctl status mssql-server
Blog92_16

-> Use below command to allow remote connections by opening TCP port 1433,

sudo firewall-cmd --zone=public --add-port=1433/tcp –permanent
sudo firewall-cmd –reload
Blog92_17

-> Open SQL Server Management Studio and connect to the Installed SQL Server using Public IP address,

Blog92_18
Blog92_19

-> All SQL Server configuration can be performed from SQL Server Management Studio.

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.

SQL Server 2019 on Ubuntu Linux

-> SQL Server 2019 installation will be performed on a Ubuntu Azure Virtual Machine.

-> Provisioning an Ubuntu Server 18.04 LTS Azure Virtual machine.

Blog91_1
Blog91_2
Blog91_3

Blog91_4
-> NIC network security group will be set to None as this is a test instance. Appropriate configuration will be required for production server

Blog91_5
Blog91_6
Blog91_7
Blog91_8
Blog91_9

-> Install Putty from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html to login to the provisioned Virtual Machine and start the SQL Server 2019 Install.

-> From Azure portal open the virtual machine provisioned and click on connect. Make sure SSH tab is selected. Public IP address in the SSH tab will be used in the putty session to connect to the provisioned Virtual Machine,

Blog91_10
Blog91_11

-> Below command can be used to import the public repository GPG keys

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add –
Blog91_12

-> Below command will be used to register the Microsoft SQL Server Ubuntu repository:

sudo add-apt-repository "$(wget -qO- "https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2019.list)"
Blog91_13

-> Below commands will be used to initiate the SQL Server 2019 install,

sudo apt-get update
Blog91_14
sudo apt-get install -y mssql-server
Blog91_15
sudo /opt/mssql/bin/mssql-conf setup
Blog91_16

In Putty, Developer Edition is selected.

Blog91_17

“License terms” should be accepted. SQL Server system administrator password should be provided. This will be the sa password.

Blog91_18
Blog91_19

-> Below command can be used to check the status of installed SQL Server,

systemctl status mssql-server --no-pager
Blog91_20

-> Open SQL Server Management Studio and connect to the Installed SQL Server using Public IP address,

Blog91_21
Blog91_22

-> All SQL Server configuration can be performed from SQL Server Management Studio.

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.