SQL-Server-2019-Installation-Guide
SQL-Server-2019-Installation-Guide
Introduction ................................................................................................................................................... 3
SQL Server Overview ................................................................................................................................... 3
SQL Server Editions ..................................................................................................................................... 3
Downloading SQL Server Installer ............................................................................................................... 5
Installing SQL Server Developer Edition ..................................................................................................... 6
Feature installation: ................................................................................................................................... 8
Select Database Engine Services, this is the minim requirement to use SQL Server ............................... 8
Instance Configuration .............................................................................................................................. 9
Server Configuration ............................................................................................................................... 10
Database Engine Configuration .............................................................................................................. 12
Error Reporting, Installation Configuration Rules, & Ready to Install .................................................. 13
SQL Server Management Tools.................................................................................................................. 14
Download SQL Server Management Studio (SSMS) ............................................................................. 14
Install SQL Server Management Studio (SSMS) ................................................................................... 15
Working with and connecting to SQL Server ............................................................................................. 16
Starting & Stopping SQL Server (optional) ............................................................................................ 16
Starting SQL Server Management Studio ............................................................................................... 17
Connecting SQL Server .......................................................................................................................... 17
Using SQL Server Management Studio ...................................................................................................... 18
Overview of SQL Server Management Studio ....................................................................................... 18
Creating a Database ................................................................................................................................ 20
Uninstall SQL Server or Change Features .................................................................................................. 23
Uninstalling SQL Server ......................................................................................................................... 23
Change SQL Server Features and Components ...................................................................................... 23
Appendix: How to Install SQL Server on a Mac ........................................................................................ 24
Dual Booting ........................................................................................................................................... 24
Using a Virtual Machine ......................................................................................................................... 25
Dual Booting Versus Using a Virtual Machine ....................................................................................... 26
2
Introduction
These instructions are used by students enrolled in the Master of Science in Computer Information
Systems and other Computer Science Department programs in both on-campus and online programs. In
some places these instructions say that you should contact your instructor. Online students should
normally contact their facilitator first.
The document begins with discussion SQL Server editions and how they are utilized in our courses,
downloading SQL Server from Microsoft and installing SQL Server itself. We continually update this
document; please let us know of problems you encounter or questions not answered.
The examples in the main document are for the Microsoft Windows family, including Windows Server
2016 & Windows 10.
These setup instructions are for SQL Server 2019 Developer Edition, however can be used in installing
other versions from 2012 and 2016 families.
SQL Server is released in several editions. To simplify your selection, we will focus on the Developer
and the Express editions. For both CS 669, the express edition will work just fine, however for CS 779
we recommend that you use the Developer Edition. The Developer Edition has the same full feature set
as the Enterprise Edition with the exception of the license. Production environments cannot be
implemented using the Developer Edition. Please refer to the SQL Server Web site for comparison of
editions. https://www.microsoft.com/en-us/cloud-platform/sql-server-editions
The Developer Edition is especially useful for those students who plan investigate advanced SQL Server
topics as part of their CS 779 term project. Our installation instructions explain which features you may
find useful for either course.
The Express Edition can be used for all the CS 669 and CS 779 assignments. The Express Edition is a
free version of SQL Server which is a smaller version that places limits on the size of the database,
computing capacity and feature set. For some of the MET courses, we have found that the Express
Edition is suitable on the most part, and has advantages of a much smaller load on the computer and
simpler installation.
3
For additional details on the features supported by both the Developer (Enterprise), Express as well as
other editions please refer to the Features Supported by the Editions of SQL Server which can be found
here: https://download.microsoft.com/download/2/9/0/290f991b-5971-42e5-bb2c-
81f700622b2e/SQL%20Server%202019%20Editions%20Datasheet.pdf
This guide covers installation of the Developer edition of SQL Server which is suitable for all classes.
For installing the Express edition follow the instructions in the SQL Server Express Installation Guide
instead of the instructions in this document.
4
Downloading SQL Server Installer
You will find the Developer addition download from the Microsoft SQL server download site.
https://www.microsoft.com/en-us/sql-server/sql-server-downloads
Once the download is complete, go to the destination folder (i.e. downloads folder on your computer).
The installation file will look something like this:
5
Installing SQL Server Developer Edition
1. Once the installation starts, you will be presented with installation type. We will focus on the
Custom install and explain various features of the installation.
2. Choose the Media Location path. Note the minimum free space and download size and press
Install.
6
3. Once the SQL Server Installation Center launches choose Installation tab (second from the
right).
4. In most cases you will want to run a New SQL Server New SQL Server stand-alone
installation, but other options are available, for example if you have a previous version of SQL
Server installed, you have an option to update.
5. On the Product Key page make sure that the selected Edition is “Developer” click Next.
6. On the License Terms page, check the box next to “I accept the license terms” and click Next.
7. Setup will check if needed install Setup Support Files. Click Next when complete.
7
Feature installation:
• For CS779 in addition to what is listed above please review these descriptions to see which
features you might be interested in for advanced topics for the term project.
• Instance root Directory and Shared Features Directory: Note the paths where SQL server will
install the components (default is Program Files folder within C drive.)
8
Instance Configuration
9. Generally, you can leave the Default Instance and the default Instance ID. The Named instances
would be used if you want to create multiple instances of SQL Server on the same machine.
Click Next when complete.
9
Server Configuration
11
Database Engine Configuration
Server Configuration:
• Authentication mode:
• Windows authentication: will only use your windows account privileges
to connect to SQL Server.
• Mixed mode: adds a local SQL system administrator (SA) account
IMPORTANT: We highly recommend using Mixed Mode so that there
is an additional built in SA account with a separate user name and
password as well as your built-in windows account in case you have
issues logging in.
• IMPORTANT: Make sure to add users (such as your account) to SQL Server
Administrators (click on Add Current User) if it is not already there.
• These accounts will allow you to log into SQL Server.
• Note that the server itself does not need these accounts and runs as a service
which you specified in previous step.
13
SQL Server Management Tools
You will need SQL Server Management Tools to work with SQL Server, this is the user interface that
include components such as the Query interface as well as components for advanced topics such as
analysis and integration services as well as the database tuning advisor. SQL Server, like other modern
relational databases, uses a client-server architecture. The database itself is the server and contains all of
the data and the capability to add, modify, delete, and access the data. A client is needed to connect to the
database and perform specific commands. The most popular client by far for SQL Server is SQL Server
Management Studio (SSMS), which you will install in this section. SSMS is very capable and provides
many powerful conveniences and capabilities.
It is required that you install the Management Tools Complete for all courses.
14
Install SQL Server Management Studio (SSMS)
Once downloaded, run the SSMS installer. The first screen that appear is shown below.
Click the “Install” button to begin. A progress screen will appear similar to the following.
Let it progress through until completion, then you will see a screen indicating successful setup, click
close. Congratulations! SSMS is now installed.
15
Working with and connecting to SQL Server
You have installed both SQL Server and SSMS. There are just a few more steps you need in order to start
using your database to complete assignments -- connecting to your database and creating a database for
assignments.
• Scroll down the list until you see the SQL Server services.
16
Notes:
• When you are no longer using SQL Server, you can shut the service down to save on system
resources.
• You can also change the startup type to be automatic while the course is running to save you the step
of turning this on and off.
• You may want to put the services shortcut to your desktop for quick access
• To work with SQL Server, you will use the SQL Server
Management Studio. You will find it under Microsoft SQL
Server Tools program group or type in in the Windows
Search bar.
• You may want to put the SQL Server Management Studio shortcut to your desktop or pin it to the
Windows Task bar for quicker access.
You have just connected to your database through SQL Server Management Studio!
17
Using SQL Server Management Studio
Overview of SQL Server Management Studio
Once you connect to SQL Server Instance you can begin to create a database, write quires, or explore the
database. Below is a very quick overview of the SQL Server Management Studio Interface to get you
started.
Creates a new query window for you to type your SQL commands.
Object Explorer allows you to browse databases, tables, columns and other objects
within the database.
18
SQL Query results. Note how the execution time and number of
rows are at the bottom.
19
Creating a Database
You are almost ready to begin working on assignments, but one more step is needed: creating a database.
Now to be sure, there is already a default database called “master”, but it is perilous to use that database
for anything of substance. Master is a system database which contains information about the server’s
configuration; that database is critical to the operation of SQL Server itself, and if it gets corrupted, or
runs out of space, the entire SQL Server instance is at risk. System databases are often located on drives
with limited space, and if we need to fail over our instance to another instance, we cannot usually restore
the master itself since each instance has its own configuration. Suffice it to say, for assignments it is
prudent to create another database.
To get started, first right-click on Databases in the Object Explorer and click New Database… from the
context menu, as illustrated below.
When the New Database window appears, enter a database name, and leave everything else defaulted. In
the screenshot below, we can use CS669 as the database name, though you can use something different if
you would like.
Then click the OK button to create the database. The window will process for a moment, then disappear.
20
Next, in the Object Explorer, expand Databases and locate your
new database.
A new query window appears, where commands can be typed, saved, and executed. The window is
illustrated next.
All your assignment’s commands can be typed and executed in this type of query window! Let’s execute
a single SQL command to verify that the database is running. In the buffer, type
and then click the Execute button just above. You may alternatively hit the F5 key to execute
the command.
21
You should see the results something like this:
Notice that the results listed out our database name, CS669. There are of course many more commands
that you will use in your course, but this gets us started. When you complete your assignments, you will
use a query window just like this, type in your commands, and execute them to get your results.
Congratulations! You have installed SQL Server and its client, connected to your database, and executed
a command. You are now ready to complete assignments for your course!
22
Uninstall SQL Server or Change Features
If you no longer need to use SQL Server, or would like to re-install it or change feature, you can use these
steps to uninstall SQL Server from your system.
8. When prompted for Feature Selection, review and update features, review Feature list in the
installation instructions in previous sections, and click Next.
9. You will be prompted to verify Installation Rules, Disk Space Requirements, Error Reporting,
and Installation Configuration Rules, click Next.
10. Ready to Install will give you a summary, click Install.
23
Appendix: How to Install SQL Server on a Mac
SQL Server can be installed and used on a Mac, but this requires some setup work. Many consider Mac
computers to be the most user friendly computers available, and there are many devoted Mac users today.
Although Mac computers may be user friendly, the Mac platform is not supported by the major, modern
DBMS vendors, including Oracle and SQL Server. If you find yourself in the situation where your home
computer is a Mac, and you do not have a readily available Windows machine available for DBMS
installation, there are two ways to run Windows on your Mac – dual booting and using a virtual machine.
Dual Booting
The first solution, dual booting, is available to you if you have a modern Mac that runs on an Intel‐based
processor. All new Macs run on Intel‐based processors, but older ones do not. Dual booting is a fairly
simple concept. Normally when you power on your computer, your operating system starts booting
immediately, and this happens seamlessly so that it appears your operating system is just a natural part of
the computer. In actuality, when your computer is first powered on, it first loads a boot loader program,
and that boot loader tells the operating system to start. If there is only one operating system, you may not
even notice the work of the boot loader, because it always starts the same operating system. However,
there is no reason why one cannot install two operating systems on their computer. In such a case, each
time your computer is powered on, the boot loader asks you which operating system you would like to
start, and also usually defaults to the first one if you do not select an option, after a timeout period.
All Macs come with what Apple terms “Boot Camp”, which is a built‐in utility that supports dual booting
Mac OS X and Windows. To install SQL Server in Windows on your Mac, you will need to:
1. Review the prerequisites needed to run Boot Camp and to install Windows as a second
operating system on your Mac computer. The prerequisites are listed at
http://support.apple.com/kb/HT1461. Ensure that your computer meets the requirements before
continuing.
2. Obtain a licensed copy of Windows. If you do not have a licensed copy of Windows, you will need
to download one from the Microsoft Azure BU site. BU students are entitled to free, licensed copies
of the latest versions of Windows through the site, and details on how to access this site are available
in your course’s syllabus.
3. Follow the steps recommended by Apple to install Windows using Boot Camp. Instructions
are included with the utility, and you can also start here as well:
http://support.apple.com/kb/HT1461
4. After Windows is installed, reboot your computer then boot into Windows. Proceed with the
SQL Server install instructions, starting from the beginning of this install guide. When you need
to run SQL Server, boot into Windows.
24
Using a Virtual Machine
A virtual machine mostly behaves as any other application, but has some differences. The virtual machine
has an application window that can be minimized and closed, the same as any other application. What
makes a virtual machine different from an ordinary application is that an entire operating system is
installed and executes inside of the virtual machine. The operating system running inside of the virtual
machine, termed a “guest” operating system, runs as if it were to be on its own physical machine. This
means we can install and use applications native to the guest operating system. Thus, once we are running
a virtual machine, we are effectively running two operating systems at the same time – our machine’s
operating system (termed the “host” operating system), and the guest operating system – and are using
applications native to both operating systems at the same time.
In our case, we are interested in running Windows as a guest operating system on our Mac. There are
many virtual machines available for Macs; however, perhaps the two most popular are VirtualBox and
Parallels. VirtualBox, available at http://virtualbox.org, is free to download and use. Students have
successfully used both to run both Windows and SQL Server on a Mac in our BU program.
Follow the steps below to install and use SQL Server on your Mac:
25
Dual Booting Versus Using a Virtual Machine
An obvious question is, which of these two options should you use? The answer depends upon your
computer hardware, and your personal preferences. The following table summarizes the advantages of
both options.
Advantages Disadvantages
Dual Booting Because both operating systems run You can only run one operating system
natively on the computer’s hardware, and its applications at a time.
there is no performance overhead.
To start the second operating system, you
Because both operating systems must reboot.
directly access the computer’s
hardware, there are not hardware There is no clipboard sharing between
compatibility issues. applications in both operating systems. If
text is to be shared across applications, it
The setup is conceptually simpler. Simply must be saved in a file then loaded by
boot the operating system you need upon applications in the other operating system.
startup.
Virtual The guest operating system and its Because the guest operating system is
Machine applications run at the same time as the running under the control of virtual
host operating system and its machine software, the guest operating
applications. system and its applications will execute
noticeably slower than if they were
There is clipboard sharing between running natively on the computer.
applications in both operating systems.
Text can be copied from an application Because both operating systems run
in one operating system, and pasted into concurrently, the performance of the host
an application in the second operating operating system may degrade.
system.
If your hardware is powerful enough to support running two operating systems simultaneously, and still
perform reasonably well, you may want to use a virtual machine, so that you can run both your Mac
applications and your Windows applications at the same time. If you are concerned about obtaining the
best performance for both operating systems, you may want to dual boot.
26