top of page
Writer's picturerajendra gupta

Install SQL Server 2022 on Ubuntu in 5 minutes

Having trouble installing SQL Server 2022 on Ubuntu? Follow our 5-minute guide and get SQL Server up and running on your Ubuntu machine in no time! We'll walk through the installation process, so you can get started using SQL Server right away.


Are you excited about the new SQL Server 2022? Yes, it's time to install it and explore its different features and enhancements.



In this article, we install SQL Server 2022 on the Ubuntu 20.0 virtual machine. If you do not have a test server, you can download Oracle VM VirtualBox and install Ubuntu on it. Please let me know in the comments if you need any assistance.


Let's start your Ubuntu VM and launch the terminal. Follow the steps mentioned below for SQL Server 2022 installation and configuration.


Import the public repository GPG security key:

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

Register the SQL Server 2022 on the Ubuntu repository

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

Use an apt-get utility to update the Ubuntu repositories.

sudo apt-get update


Download and install SQL Server 2022: This step may take time as it will install dependencies packages such as gawk, libatomicl , libc++1. It will also download SQL Server 2022 setup from the Microsoft registry and start the installation process.


Note: We do not have GUI mode for SQL Server on Linux.

sudo apt-get install -y mssql-server




SQL installation completes and asks you to run the mssql-conf utility for configuration. This mssql-conf utility requires specific user inputs.

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

The following inputs are required:

  • SQL Server edition: Enter the serial number of the SQL Server 2022 edition that we wish to use. For this demo, I will go with the first option, Evaluation.

  1. Evaluation

  2. Developer

  3. Express

  4. Web

  5. Standard

  6. Enterprise

  7. Enterprise Core

  8. BYOB ( Bring your license)


Accept SQL Server License terms, and Choose the SQL Server Language. I enter value 1 for English installation. We also need to specify the sysadmin (SA) password for configuring SQL Server, as shown below.


Since we chose the Evaluation edition, the installer gives a message that there are 107 days left in the expiry of the evaluation period.



Once SQL Server 2022 is installed, you get the message – Setup has completed successfully. SQL Server is now starting, and it is advisable to check the service status.

systemctl status mssql-server --no-pager

The output should show the service status as active(running), process id( PID), Memory, and default bin directory.




For connecting to SQL Server 2022 Linux, we require command-line tools such as SQLCMD or Azure Data Studio, SQL Server Management Studio. If you want to connect remotely from a Windows machine, you can install SSMS from the link.


SSMS is a windows based application. Therefore, you can choose Azure Data Studio for installation in the Linux machine itself. You can refer to the guide for setting up Azure Data Studio in Linux.


Once installed, launch Azure Data Studio and create a new connection for SQL Server 2022.



The Azure Data Studio dashboard shows the version as 16.0.600.9, i.e., Microsoft SQL Server 2022 Community Technology Public Preview 2.0 (CTP 2.0).


You can verify that SQL Server 2022 has a new compatibility level, 160.



I’m really excited to be writing blog posts such as this that showcase the different features and capabilities of SQL Server 2022. I’m sure that the further I get into my series, the more I’ll learn about all of the new features in this exciting release! If you have any comments or questions about the SQL Server 2022 release, don’t hesitate to contact me at rajendra.gupta16@gmail.com. I’d love to hear from you!



8,753 views7 comments

Recent Posts

See All

7 Comments


Unknown member
Jun 07

One of the most difficult courses is chemistry, and students frequently run into difficulties when trying to solve their chemistry. Do you find it difficult to understand the complex concepts of elements, compounds, and chemical reactions? Are you looking for professional advice to help you ace your chemistry homework? There's nothing else to look! Welcome to Chemistry Assignment Help, your go-to source for simple comprehension of chemistry concepts. Our committed team of professionals is available to offer you all-encompassing support in the field of chemistry. Our Chemistry Homework Help service is made to meet your individual needs, whether you're a college student working on advanced topics or a high school student struggling with fundamental ideas. Our knowledgeable tutors can assist…

Like

Unknown member
Jun 04

One of the primary advantages of assignment writing is the opportunity it provides for students to deepen their subject knowledge. Engaging in research, analyzing data, and formulating arguments allows students to explore topics in greater detail. By delving into a subject, students gain a comprehensive understanding of its concepts, theories, and practical applications. This process not only facilitates pay to write my assignment performance in assignments but also enriches their overall academic journey.

Like

Unknown member
Apr 24

assignment help australia offers invaluable assistance to students grappling with academic challenges. Their services encompass a broad spectrum, from essay writing to dissertation guidance, ensuring comprehensive support throughout a student’s academic journey. With a team of experienced professionals adept in various subjects, they deliver high-quality work tailored to individual requirements, fostering academic success and relieving the burdens of tight deadlines and complex assignments. Moreover, their commitment to confidentiality and plagiarism-free work underscores their dedication to academic integrity. For Australian students seeking reliable academic support, Assignment Help Australia stands as a trusted ally, facilitating learning and achievement.

Like

Unknown member
Apr 24

Navigating the intricacies of case studies can be challenging, requiring a deep understanding of research and analytical skills. Our Case Study Help provides expert guidance, ensuring your success in crafting well-analyzed and structured case studies. Seasoned professionals offer tailored solutions, addressing specific case study requirements. Timely delivery allows thorough review before submission. Comprehensive support spans diverse topics, empowering you to confidently tackle assignments. Affordable services make quality assistance accessible, acknowledging the financial constraints of students.

Like

Unknown member
Aug 09, 2023

a few seconds ago

systemctl status mssql-server --no-pager × mssql-server.service - Microsoft SQL Server Database Engine Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2023-08-09 20:34:43 EEST; 55s ago Docs: https://docs.microsoft.com/en-us/sql/linux Process: 1911406 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=127) Main PID: 1911406 (code=exited, status=127) CPU: 4ms Aug 09 20:34:43 4ojr.l.time4vps.cloud systemd[1]: mssql-server.service: Sche… 4. Aug 09 20:34:43 4ojr.l.time4vps.cloud systemd[1]: Stopped Microsoft SQL Serv…ne. Aug 09 20:34:43 4ojr.l.time4vps.cloud systemd[1]: mssql-server.service: Star…ly. Aug 09 20:34:43 4ojr.l.time4vps.cloud systemd[1]: mssql-server.service: Fail…e'. Aug 09 20:34:43 4ojr.l.time4vps.cloud systemd[1]: Failed to start Microsoft …ne. Hint: Some lines were ellipsized, use -l to show in full. I don't know what to do, I have already reinstalled it several times, the server does not start and writes an error

Like
Unknown member
Oct 17, 2023
Replying to

intstall the missing lib through the following link : https://askubuntu.com/a/1489354/1739422

Like
bottom of page