May 302017
 

SQL Server administration, once installed and running, doesn’t vary too much based on your operating system, but the differences in the operating systems are pretty significant. To properly administer a production SQL Server on Linux, an administrator needs to understand the core basics of the Linux operating system.

I’m going to limit the scope of these discussions to the currently supported (as of CTP 2.1) operating systems for SQL Server on Linux, namely Red Hat / CentOS, SUSE, and Ubuntu. Most of the images in the screenshots will be from Ubuntu, my preferred distribution of choice, but the core concepts are very similar across all distros. If you’re looking for production systems, you should want to pick a distribution where you can purchase production-grade support.

First, installing Linux is pretty straight forward.  Similar to Windows, an installable image is downloaded, usually in the form of an ISO. Go to their respective web sites, download the ISO image, and follow their installation guides to perform the most minimal installation possible of their distro.

Red Hat Linux installation guide

CentOS Linux installation guide

SUSE Linux installation guide

Ubuntu Linux installation guide

Just do a basic installation with nothing else but an SSH server installed. One of the primary benefits of Linux is that the installable footprint is tiny, keeping the security and maintenance as small as possible. I personally don’t even want a GUI installed, as I’d just use it as a front end for a terminal anyways.

Once installed, now what?

Use SSH to get access into the console of this new server. Log in with your login and password that you created when you installed the operating system. To make things even more secure, you can use certificates to streamline your login process.

Now, let’s explore some of the commands that we need to use to get around the operating system. This is just a short list of the main commands you need to know when navigating the console of a Linux system.

The primary ones are ‘cd’ to change directory, ‘ls’ to list folder contents, mkdir and rmdir to make and remove folders, ‘rm’ and ‘mv’ to remove or move a file. ‘pwd’ tells you your present working directory.

You’ll want to learn the syntax for one of the console-based text editors. My personal favorite is ‘vi‘. It’s quick, streamlined, but does have a significant learning curve. Emacs is another editor that works great. Many others are out there, and your options open even more if you’re using a GUI. You’ll need an editor to edit configuration files.

The folder structure of Linux is one of the biggest changes. Whereas Windows is based off of an arbitrary drive-letter assignment system that dates back to the DOS era, Linux is is based off of a tree structure. All folders and files are based on a single point, ‘/’ or the root folder, and everything is based off of folders from this point. Certain folders from Windows, such as C:\Windows, C:\Users\username, or %WINDOWSTEMP%, are mapped to certain folders within the Linux operating system.

Your home directory is at /home/yourusername. SQL Server for Linux installs at /var/opt/mssql, at as of CTP 2.1 cannot be changed.

But… as you start to poke around the operating system, you’ll start to notice that some folders state ‘access denied’. Everything that you normally execute runs in a minimal least-privilege level of access.

Elevated Access

The biggest concept of Linux is the concept of ‘root‘.

We’ve all seen this in Windows:

This prompt is so that you are running your normal commands without elevated privileges, so that any significant system change cannot be made without an additional layer of authorization. The ‘root’ user in Linux is essentially a full-access account, similar to ‘sa’ in SQL Server.

Issuing a command that requires elevated privileges usually ends with an error like this.

You start with the ability to issue a single command with ‘sudo command’, or super-user do this. You can execute one of these elevated commands as follows to execute this single command with elevated privileges.

Use sudo sparingly, just as you would with Windows and good security principals. If you need to run a series of commands as the elevated user, issue ‘sudo su –‘ to switch to the root user for the session. Type exit to exit this level of elevation and switch back to your normal user account.

You’ll want to explore the system logs at /var/log, as these are a significant source of information about how your operating system is running.

Use ‘cat file’ to view these files to the console, and ‘tail -f file’ to see the changes to these files as they occur.

Things you’ll want to do before you continue to installing SQL Server:

  • Patch and get the operating system up to date
  • Set a static IP address
  • Verify and set your hostname
  • Specify your DNS servers and DNS entry
  • Verify your security to ensure that the operating system is locked down. Your respective operating system distribution is sure to have hardening documentation for you to follow.

One tip – want to visually manage the system remotely and quickly? Install Webmin! Follow the directions specific to your operating system. Browse to your server with a web browser at https://servername:10000/ and log in with your credentials.

Poke around, install, configure, and explore your new operating system’s basics! (Admittedly, it’s not too exciting at the moment. You’ve got a console. Woohoo!)

Next stop – installing SQL Server on Linux!

 Posted by at 11:58 am  Tagged with:
May 082017
 

Starting this week, I’m introducing a new series of blog posts for the SQL Server DBA on how to properly set up and administer a production SQL Server on the Linux operating system.

As you know, Microsoft is shipping SQL Server 2017 (currently at CTP 2.0) with support for the Linux operating system. You might not think you’ll ever use this in your organization, but you might be quite surprised at the adoption rate I’m already experiencing in the wild. You should prepare yourself as a SQL Server administrator for some key similarities and differences with this new platform for tasks such as server build and construction, operating system basics, installation and patching, backups and recovery, availability, etc.

This blog post series is designed to help ramp you up on these tasks and answer common questions for scenarios that SQL Server DBAs will encounter while running SQL Server on Linux. Stay tuned!

 Posted by at 3:12 pm  Tagged with:
Mar 292017
 

Watch your memory configuration! You can’t just throw RAM in a physical server and expect it to work right. Depending on your DIMM configuration, you might have accidentally slowed down your memory speed, which will surely slow down your application servers. This speed decrease is virtually undetectable from the OS. Anything that leverages lots of RAM to function, including a database server, can take a substantial performance hit on performance.

An example of this is if you wish to configure 384GB of RAM on a new server. The server has 24 memory slots. You could populate each of the memory slots with 16GB sticks of memory to get to the 384GB total. Or, you could spend a bit more money to buy 32GB sticks of memory and only fill up half of the memory slots. Your outcome is the same amount of RAM. Your price tag on the memory is slightly higher than the relatively cheaper smaller sticks.

In this configuration, your 16GB DIMM configuration runs the memory 22% slower than if you buy the higher density sticks. Check out page 63 of the server build guide for an HPE Proliant DL380 Gen9 server. The fully populated 16GB stick configuration runs the memory at 1866 MHz. If you only fill in the 32GB sticks on half the slots, the memory runs at 2400 MHz.

Database servers, both physical and virtual, use memory as an I/O cache, improving the performance of the database engine by reducing the dependency on slower storage and leveraging the speed of RAM to boost performance. If the memory is slower, your databases will perform worse. Validate your memory speed on your servers, both now and for upcoming hardware purchases. Ensure that your memory configuration yields the fastest possible performance. Your applications will thank you!

Feb 212017
 

The response to our most recent job position was incredible, and I’d like to thank all of the folks who responded and submitted their CVs to us for consideration. In the end, we had one open position, and we selected the most qualified candidate for the position.

I’d like to introduce Bob Pusateri as our new Data Platform Solutions Architect!

Bob Pusateri is a Microsoft SQL Server Certified Master and highly experienced SQL Server DBA with over 10 years of deep SQL Server experience. he holds an MS in Computer Science from DePaul University. His primary interests involve database internals, performance tuning, and VLDB management. He is an active member of the SQL Server community, including speaking at many national SQL Saturday events and active with both of the Chicago-area local PASS user group chapters. He has also presented at the PASS Summit. Bob is on Twitter at @SQLBob and has a great blog site at bobpusateri.com.

We welcome Bob on board, and are extremely proud to have him contribute to our customers’ success!

 Posted by at 10:42 am
Jan 202017
 

I’m proud and humbled to announce that my company, Heraflux Technologies, is hiring for a Data Platform Solutions Architect!

We are looking for a highly qualified technologist who is comfortable with database technologies, such as Microsoft SQL Server and other DBMS platforms, and infrastructure technologies, such as virtualization, converged platforms, public cloud, and system administration.

The Solutions Architect is accountable for working with a number of organizations in a variety of industries to improve the availability, performance, and efficiency of the infrastructure stack underneath the application.

This position is more of a SQL Server focused role, and only senior-level SQL Server administrators should apply. More details are available here, and we look forward to hearing from you!

Jan 182017
 

If you’re in the Boston area tomorrow, I urge you to go to this year’s Virtualization Technology Users Group (VTUG) Winter Warmer event tomorrow at Gillette Stadium. It’s better than a regional VMUG, and not just VMware specific. It’s covering all things infrastructure, virtualization, and cloud, and it’s held at the stadium to boot! It’s a great event, and I’ll be there in the afternoon at the Microsoft booth answering questions on virtualization, cloud, and business-critical apps!

VTUG Winter Warmer

When: January 19, 8:00am to 6:00pm

Location: Gillette Stadium, Patriot Place, Foxboro MA (GPS 1 Patriot Place)

Register now – for FREE – and I’ll see you there tomorrow!

 Posted by at 3:25 pm  Tagged with: