Working with MS SQL Server in Python on Linux

Today we’re turning our attention to Python, and looking at how you can connect to a Microsoft SQL Server database running on Linux using Python. In this tutorial, we’ll look at establishing a connection and running a few sample queries.


Configuring MS SQL Server on Linux

Once you’ve installed Microsoft SQL Server on Linux, you’ll want to make sure it’s configured as you’d like it to be. There are a few ways to do this, and today we’ll look at two: environment variables and the mssql-conf binary.

Connecting to Microsoft SQL Server in Node.js on Linux

Today we’re going to look at connecting to Microsoft SQL Server for Linux through Node.js similar to how we connected in PHP earlier. Just as before, our goal is to enable web application development by connecting to an existing MS SQL Server running on our local host. This time, we’ll do so using Node, and the popular Node library Tedious.


Connecting to Microsoft SQL Server in PHP on Linux

PHP and SQL Server work together wonderfully! Once you’ve gotten MS SQL Server installed on your Linux machine, it’s time to start running some real applications on it. Today we’ll look at querying SQL Server from PHP to enable your web applications.


Migrating SQL Server Data from Windows to Linux

Migrating a SQL server database from Windows to Linux is not that difficult! The recommended method is a three-step process of 1) backing up the database to a file on the Windows machine, 2) moving that file over to the Linux machine and 3) using the restore feature to import the data in Linux. Each of these steps is very straightforward. (more…)

How to Backup SQL Server on Linux

You can back up your SQL Server databases on Linux using one of two approaches: by connecting to them with an external, non-Linux-based application such as SQL Server Management Studio (SSMS), or by running the sqlcmd client directly on your Linux machine. The latter option allows you to access native Transact-SQL BACKUP functionality and this post will specifically demonstrate it. (more…)

SQL Server on Linux: Behind The Scenes

Now it has become known that in order to make SQL Server run on Linux one has to introduce the so-called Platform Abstraction Layer (PAL) into SQL Server. The PAL is used to align all platform or operating system specific code in a single place and by doing so allow the rest of the codebase to stay operating system agnostic. The PAL was never previously required because SQL Server has been running only on Windows operating system for a long time. In reality, to ensure that numerous functionalities are available the SQL Server database engine codebase contains plenty of references to popular libraries on Windows. (more…)