Installing SQL 2019 on LInux (RHEL/CENTOS)

Wish you all a very happy new year folks!  Been a while since I posted something, so here I am 🙂  I would like to begin my blogging in year 2020 with Linux. Long ago, I wrote an article on how to setup a VM with CentOS and install SQL 2017 on top of it. I am not going to walk through those steps again., Instead let’s see if the setup experience is any different from SQL 2017 on RHEL.

Before begin installing, Let me examine repos on my linux machine. you can do that by navigating to /etc/yum.repos.d folder.

Well, this is a brand new installation. That explains all the repositories I have on my machine! Now, It’s time to download SQL Server repo from microsoft.
command: 
sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/8/mssql-server-2019.repo

Once this part is done, it’s time for actual installation.
Command:
sudo yum install -y mssql-server

Alright, let’s perform the configuration portion(EULA,Edition,sa pwd) as instructed by setup program.
Command:
sudo /opt/mssql/bin/mssql-conf setup

Oops! My configuration failed. you can clearly see the reason why my installation failed. I was way too conservative in terms of granting resources to my VM. Once I bumped up my RAM to 4 GB, all went well.

Check status using either ps-ef | grep mssql-server or systemctl command as shown below.

Now it is time to install client tools on the server. Microsoft has provided a separate repo for client tools which we need to download similar to what we did in step 1.
Command:
sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/8/prod.repo
Note: Check RHEL version (7 or 8) and download appropriate repos.

Don’t forget to add sqlcmd and bcp tools to path to avoid providing literal path every time we need to access sqlcmd. I hope microsoft will take care of this as part of post installation in future releases instead of manual intervention. ( Symbolic links may be??)

Testing what we have done so far…..

That’s it for this blog post folks! As you can see the installation experience hasn’t been changed much from the last version of SQL on Linux!

Note: This is online setup experience, assuming your Linux machine can talk to internet. Microsoft did a great job on documenting online and offline installation methods. I would definitely recommend anyone to go through the documentation for more details.

Happy learning!

Advertisement

SSMS 18.0 – SQL Server Priority Boost

I’ve been playing with SQL Server 2019/SSMS 18.0 since past few days and noticed something really awesome, there’s no more “Boost SQL Server Priority” option is SSMS 18.0 !!!! It’s probably one of the most requested feature in SSMS by DBA community.

The name “Boost SQL Server Priority” sounds like an amazing switch which makes SQL run on steroids, but in reality it’s the other way around.

So, what exactly does this option do?
Ans: It doesn’t matter in year 2019, Let’s just pretend we never had this option 🙂  Well, If you are still curious what this is about, enabling this setting will make SQL Server process run in “HIGH_PRIORITY_CLASS”. Almost every process in windows run in “NORMAL_EXECUTION_CONTEXT” including network drivers, Storage drivers, I/O drivers and etc etc etc. In other words, you are making SQL Server run in higher execution context on CPU than almost any other process on your server.

So, when do we need to enable this on our SQL Servers?
Ans: Never. There’s a reason why microsoft removed this option from SSMS.

Enough background, see what I am talking about in the below screenshots.

Cheers!

SQL Server 2019 CTP 2.3 is here…

Microsoft announced SQL Server 2019 CTP 2.3 in SQL bits (If you are not aware of what SQL bits is, it’s European version of SQL PASS) Keynote on Friday, first of March 2019. I really didn’t got chance to Install SQL 2019 initial release of CTP when it got released sometime around  Sep 2018, In this blog post let’s take a quick Screenshot tour of Installing SQL Server 2019 CTP 2.3 on Windows Server 2016.

First thing first, we need to download media from Microsoft.
https://www.microsoft.com/en-us/sql-server/sql-server-2019#Install

In this case, I am installing on Win Server 2016, So I picked Option 1.

As highlighted in the above screenshot, I opted to download ISO file and have a copy for myself so that I can use this to Install on a different machine in future without any hassles.  Well, It’s all done in few mins…

Now, let’s go to the actual Installation part.

1.
2.

3.

4. I am interested in just the DB Engine for now.

5. Provided my service accounts

6. Time to configure Data Directories and don’t forget to visit TempDB tab.

7. Next—-> Next and Done!

Nothing fancy here with Installation. Now, I downloaded and Installed latest release preview of SSMS which supports SQL Server 2019 and below is the output of @@Version.

Note: If you have previous releases of 2019 CTP installed on the same machine, you can’t perform an Inplace upgrade to CTP 2.3, However you can have them side by side without any issues. In other words, It’s not required to uninstall previous release of CTP in order to Install 2019 CTP 2.3 as a different Instance.

BTW, my favorite feature of this release is “Accelerated DB Recovery and Instant Rollback for long running transactions”. There are few other new features added related to SSAS and Big data Clusters as well, but I am really not interested in those at this moment.

Cheers!