Jun 01, 2018 Install and Configure MySQL Workbench on Ubuntu 16.04; Install and Configure MySQL Workbench on Ubuntu 16.04. Updated Friday, June 1. Can write, and have expertise in a Linux or cloud infrastructure topic, learn how you can contribute to our library. Get started in the Linode Cloud today. Create an Account. SQL ODBC drivers for OpenEdge are available for Windows and Linux. This article focuses on installing SQL driver on Ubuntu 16.04 GNU/Linux Server and is a continuation of Modern web applications and API with OpenEdge, SQL, ODBC and PHP. Install the following software prior to installing SQL ODBC drivers.
In the year 2016, Microsoft surprised the IT world with the announcement of their plans to bring MS SQL Server to Linux.
Under Satya Nadella’s leadership, the Redmond giant has made significant progress towards taking advantage of the areas where Linux dominates the industry (such as the technologies that power the cloud). The move to make SQL Server available in Linux is yet another indicative of this approach.
Whatever the company’s motivations behind this initiative, Linux system administrators are likely to need to learn how to install, maintain, and use MS SQL Server – especially considering that the preview version packages are already available for Red Hat Enterprise Linux 7.3+ (includes CentOS 7.3+ as well) and Ubuntu Server 16.04 bits (sorry – no 32-bit version available!).
The only “fancy” system requirement of the preview version is that the system where it is installed must have at least 2 GB of RAM.
Installing MS SQL Server on Linux
In this quickstart article, we will explain how to install SQL Server 2019 preview on RHEL/CentOS 7.3+ releases and Ubuntu 16.04.
Installing MS SQL Server on RHEL/CentOS 7.3+
1. To install SQL Server on RHEL/CentOS 7.3+ releases, download the Microsoft SQL Server 2019 preview Red Hat repository configuration files, which will install the mssql-server package and mssql-tools using the following curl commands.
2. Then install the SQL Server and mssql-tools with the unixODBC developer package using yum package manager, as shown.
3. When the installation is complete, you will be reminded to run the configuration script (/opt/mssql/bin/mssql-conf) to accept the license terms, set the password for the SA user, and choose your edition.
4. Once the configuration is done, verify that the SQL Server service is running.
5. Open port 1433/tcp on your firewall in order to allow external clients to communicate with the database server:
If you’re using firewalld:
Otherwise (using iptables):
Installing MS SQL Server on Ubuntu 16.04
1. In order for Ubuntu to trust the packages from the MS SQL Server repositories, import the GPG keys using the following wget command.
2. Add the Microsoft SQL Server Ubuntu repository for SQL Server 2019 preview.
3. Resynchronize the package index files and update the core package and additional tools:
4. Run the configuration script as in the previous case:
5. Choose “Yes” when prompted to accept the license terms for MS SQL Tools:
Configuring MSSQL Tools on Linux
Testing MS SQL Server on Linux
We will login to the server and create a database named Fabrics. The -P switch must be followed by the password you chose when you installed the package previously:
If you’re using Linux, you can continue using the command-line as shown above. Otherwise, install SQL Server Management Studio Express if you’re on Windows.
Once done, enter the IP of the database server (192.168.0.200 in this case) and the login credentials (username=sa, password=YourPasswordHere):
Connect to MSSQL Server
Upon successful login, the Fabrics database should appear at the left-hand side:
Next, click New Query to open a new query window where you’ll insert the contents of the Fabrics script from Codeproject.com, then click Execute.
If successful, you will see the script created 5 tables and the number of records in each:
Create a Sample SQL Database
To wrap up, run the following query to retrieve the first 5 records from the Clients table:
The results should be identical to the output in the following image:
Congratulations! You have successfully installed and tested MS SQL Server on Linux!
Summary
In this article, we have explained how to install MS SQL Server on RHEL / CentOS and Ubuntu Server.
Due to the newfound closeness of Microsoft and Linux, Linux system administrators will need to be knowledgeable on MS SQL Server if they want to stay at the top of their game.
By mid-2017, the same SQL Server editions will be offered on Linux as today on Windows: Enterprise, Standard, Web, Express, and Developer. The last two are free but only the Express edition will be licensed for production use (but with resource limits).
As always, feel free to use the comment form below to drop us a note if you have any questions. We look forward to hearing from you!