In my previous articles, we installed SQL Server 2019 on the windows environment (vs Linux / Ubuntu). We also explored some of the important enhancements in SQL Server 2019
- SQL Server 2019 installation and overview
- SQL Server 2019 – New DMF sys.dm_db_page_info
- PolyBase series of articles.
- SQL truncate enhancement: Silent Data truncation in SQL Server 2019
- SQL data classification – Add sensitivity classification in SQL Server 2019
- The new SQL Server 2019 function Approx_Count_Distinct
SQL Server 2019 works on both the windows and the Linux operating system and in this series, I’ll be focusing on using SQL Server with Linux and Ubuntu
In the installation page of SQL Server 2019, we get below options.
It is very important for the database developers and the database administrators to be familiar with the SQL Server on all environments. In most organization, SQL DBA might not be having the test Linux environment. Therefore, it becomes difficult to explore this version on the cross-platform operating system. In this article, we will install SQL Server 2019 CTP 2.1 on the Ubuntu Linux. Before installing SQL Server, we will prepare the test VM environment.
In this part of the article, we set up a virtual machine and load Ubuntu operating system in it.
You can follow this article to install SQL Server 2019 CTP 2.1 on Ubuntu without having knowledge of the OS other than Windows.
Steps to prepare a Virtual Machine
- The first step is to install free and open-source Oracle VM VirtualBox. This is a free and open source cross-platform virtualization software to host the virtual machine. Installation of VirtualBox is quite simple and straightforward. Download Oracle VM VirtualBox version 5.2.22 for windows environment and follow the installation wizard to finish the installation. In this article, further, we will refer ‘Oracle VM VirtualBox’ as ‘VirtualBox’
Launch VirtualBox and click on ‘Create Virtual Machine’. This launches the wizard in which we need to specify the following items
- Name of the Virtual Machine
- Type: in this option, select the type of the operating system from the drop-down list
- Version: Select the version of the operating system. For example, in this article, we want to install Ubuntu 64-bit version
- In the next step, specify the RAM for the virtual machine. Recommended memory size is 1024 GB. We will install SQL Server 2019 on this VM, so I specified memory size 3096 MB
- Now, we can specify a virtual hard disk to this machine. We can create a virtual hard disk or if we have the existing disk, select the last option and use existing virtual hard disk file. We will select ‘Create a new virtual hard disk now’ option to create it. We should have sufficient free space in the hard disk
- VDI (VirtualBox disk image)
- VHD (VirtualBox hard disk)
- VMDK (Virtual Machine disk)
Since we have specified to create the new virtual hard disk, in the next step, specify the hard disk format:
Select the VDI (VirtualBox disk image) in the next step as shown here.
- For the new hard disk in the virtual machine, we will either give it a fixed size or dynamic size. In the dynamic size, the hard disk will use the space on the physical hard disk. We do not space related issue for our test virtual machine so let us select the option ‘Dynamically allocated’
Specify the hard disk name. We will keep it same as the name of our virtual machine. Since we are using dynamically allocated hard disk size, we can simply move to the next step.
Now, click on ‘Create’ and we can see the new virtual machine on the left-hand side. The current state of the virtual machine is ‘Powered off’.
Before we move further, we need to download the Ubuntu operating system software. We will install the latest version of Ubuntu 18.10 for desktop PC and laptops. Go to the link ‘Download Ubuntu Desktop’ and download ‘Ubuntu 18.10’.
Now, let us start the virtual machine which we created earlier. Right click on virtual machine ‘SQLVM1’ and click on ‘Start -> Normal Start ‘.
We have not specified the image of the Ubuntu in the virtual machine yet. When we start the virtual machine, it asks for the start-up disk. In the start-up disk, specify the path of the downloaded ISO file of Ubuntu 18.10 and click on ‘Start’.
Now, the Virtual machine starts to load and configure the Ubuntu operating system from the ISO file.
We can specify the language of the operating system from the list of languages. It also gives two options to install Ubuntu:
- Try Ubuntu: we can start Ubuntu from a CD or USB drive. We can just use Ubuntu for the duration of that session. When we shut down the machine, all of our data is lost
- Install Ubuntu: This option will install Ubuntu on the virtual machine similar to when we install windows on our system, laptops
We want to install Ubuntu on the virtual machine, therefore select the option ‘Install Ubuntu’:
- Choose keyboard layout. We can test the keyboard by type test as well. Let us go with default keyboard layout ‘English(U.S.)’
In the next screen, we can choose from the below options:
- Normal installation: Normally installation installs Ubuntu OS with the web browser, office software, and the media players etc.
- Minimal installation: In the minimal installation, it installs Ubuntu with system tools, web browser, and basic utilities
We can also choose to install updates while installing Ubuntu or disable this option by removing the checkbox ‘Download updates while installing Ubuntu’:
In the next step, we can choose from the different options provided. By default, it gives the option ‘Erase disk and install Ubuntu’. We have created a new hard disk, so we do not have an issue with the erase disk and then install Ubuntu. Click on ‘Install now’ to begin the installation.
Click on ‘Continue’ to erase the disk and install.
Provide the location and click ‘Continue’.
Enter the personal details like full name, username and the password.
Now it starts copying the files and show progress as installation goes on.
You can track the progress of the Ubuntu installation.
Once the installation is complete, we need to reboot the system as per the message is shown.
During the reboot, it gives a message to remove the installation media and press ‘Enter’.
Now the Ubuntu software loads into the virtual machine and we can enter the password for the user created during installation.
We can connect online accounts to access the documents, images etc. We can skip this option as it is not mandatory.
We can choose to send diagnostics information to Ubuntu developers to improve the product. We can disable this option by click on ‘No, don’t send system info’.
Here we go, we can see the desktop after loading the Ubuntu operating system:
Let us verify the operating system version. For this, go to Applications -> Terminal and run the command
- lsb_release –a.
In the below command, we can see the Ubuntu version as Ubuntu 18.10.
In this article, we explored to prepare Oracle VM VirtualBox and install Ubuntu 18.10 on it. In the further articles, we will install SQL Server 2019 on it and explore its important features.
Table of contents
- How to use the CROSSTAB function in PostgreSQL - February 17, 2023
- Learn the PostgreSQL COALESCE command - January 19, 2023
- Use of the RESTORE FILELISTONLY command in SQL Server - December 21, 2022