SQL Server - SQL Server Management Studio (SSMS)

SQL Server - SQL Server Management Studio (SSMS)

SQL Server Management Studio is the main administration console for SQL Server. It allows you to create and administer databases, security, replication, backups, and more.
There are many ways to connect to SQL Server. The method you use will depend on your environment, and where you're connecting from. For example, you can connect via a web application, an online admin tool, via a command line utility, or via SQL Server Management Studio.
SQL Server Management Studio (SSMS) is a graphical admin tool that allows you to perform all sorts of tasks with SQL Server. You can create and manage databases, create user accounts, configure advanced security options, schedule regular backups, and more.
SSMS also provides Transact-SQL, MDX, DMX, and XML language editors for editing and debugging scripts.

Getting Started with SQL Server Management Studio

Despite the many steps involved in installing SQL Server, none of those steps involved installing SQL Server Management Studio.
In earlier versions of SQL Server, you could select SQL Server Management Studio (SSMS) as an option in the installation wizard, but this is not the case with SQL Server 2016. So we must install SSMS separately.
Here's how to get started with SSMS.
  1. Install SSMS

    Screenshot of the Installation Center.
    You can install SSMS from the same SQL Server Installation Center that you used to install SQL Server.
    Ensuring that Installation is selected in the left menu, select Install SQL Server Management Tools and follow the prompts.
    This actually downloads SSMS before installing it. So it can take some time.
    Here are the screenshots if you need them.
    You can also download SSMS from the Microsoft website if you need to.
  2. Open SSMS

    Screenshot of the Program Files in Windows.
    You can now open SQL Server Management Studio by finding it in your Windows apps list.
    It is located under Microsoft SQL Server 2016.
    Depending on your operating system, you could also type SSMS into the Start Page and it should pop up.
  3. Connect to SQL Server

    Screenshot of connecting to SQL Server.
    SSMS will prompt you to connect to SQL Server.
    Select the server type, server name, and the authentication details and click Connect.

The SSMS Interface

Here's a quick overview of the SQL Server Management Studio interface.
  • The Object Explorer

    Screenshot of SSMS.
    Once successfully connected to a server, you will see the server's objects displayed in the Object Explorer on the left.
    Object Explorer is a tree view of all the database objects in a server. This can include the databases of the SQL Server Database Engine, Analysis Services, Reporting Services, and Integration Services.
  • Document Windows

    Screenshot of SSMS.
    The large area to the right of the Object Explorer is allocated to document windows. This area can contain query editors and browser windows. Its contents depend on the current context.
    For example, clicking on New Query in the toolbar will add a new query window, so that you can enter a query. Opening a table in Design view will display the table's fields and their properties. And clicking View Help will open a browser window with SQL Server 2016 Technical Documentation from MSDN.
  • Other Windows

    Screenshot of SSMS.
    Various other windows and wizards are available in SSMS.
    For example, the Registered Servers window lists the servers that you manage frequently.
    The Properties window describes the state of an item in SQL Server Management Studio, such as a connection or a Showplan operator, and information about database objects such as tables, views, and designers.
    Many properties are read-only in the Properties window but can be changed elsewhere in the Management Studio.

Servers and Databases

You can use SQL Server Management Studio to create as many databases as you like. You can also connect to as many databases on as many servers as you like. These all appear in the Object Explorer.
So you could run a query on your development environment, then switch to your test or production environment and run a query there. Because of this, you need to be careful that you don't accidentally run a script against the wrong server.
Most of the tasks performed with SQL Server Management Studio are initiated either from the top menu, or by right-clicking on an icon/object.
SQL Server - Install

SQL Server - Install

SQL Server 2016 can be installed with the SQL Server Installation Wizard, which allows you to install all SQL Server components in one go.
If you don't have a copy of SQL Server 2016, you can download the installation files from the Microsoft website. The Express edition is a free download, as is the Developer edition.
The examples in this tutorial are all done using the free Developer edition. You'll need to become a Visual Studio Dev Essentials member first (if you're not already a member). If you don't want to become a Visual Studio Dev Essentials member, you can download the free SQL Server 2016 Express edition without that requirement.
Here's a high level overview of the steps required to download and install SQL Server 2016.
  1. Download SQL Server

    Screenshot of the Microsoft Website download area.
    Download SQL Server from the Microsoft website.
    For a free download, choose either the Express or Developer edition.
    Choosing the Developer edition will direct you to the Visual Studio Dev Essentials website. You will need to log in or become a member in order to download SQL Server Developer edition.
    Membership is free, and you get access to other free downloads too.
    If you don't want to become a Visual Studio Dev Essentials member, download the free SQL Server 2016 Express edition.
  2. Launch the SQL Server Installation Center

    Screenshot of the installer file.Screenshot of the security message.
    Once the package has downloaded, open the folder in the File Explorer and double-click Setup to launch the SQL Server Installation Center.
    Click Yes if you get a security message asking if you want the app to make changes to your PC.
  3. Start the Installation

    Screenshot of the Installation Center.
    The SQL Server Installation Center will now open.
    Ensuring that Installation is selected in the left menu, click the first option, New SQL Server stand-alone installation or add features to an existing installation to start the installation process.
    This will open an installation wizard that guides you through the process.
  4. Complete the Installation

    Screenshot of the Installation Complete message.
    Continue through all steps of the installation wizard.
    Once the installation is complete, a screen will show that it has completed successfully.
    Click Close.

More Screenshots

Check out SQL Server 2016 Installation with Screenshots for a step-by-step guide through the installation wizard, complete with screenshots.

New Installer

There's a new installer that makes installation much easier. Using this installer, a basic installation can be done in 3 clicks (although a customized install will require more steps).
If you see this option on the download page, feel free to use it instead of the steps above.
Screenshot of the new installer.
SQL Server - Introduction

SQL Server - Introduction

Microsoft SQL Server is a Relational Database Management System (RDBMS) developed by Microsoft. It is a highly scalable product that can be run on anything from a single laptop, to a network of high-powered cloud servers, and anything in between.
Of course, by "anything", it still needs to satisfy the usual hardware and software requirements, but these requirements are reasonably modest, considering what SQL Server is capable of.
According to Microsoft, SQL Server is the number 1 most-used database in the world. According to various other sources, it's more like number 2, 3, or 4. In any case, it's one of the most popular database management systems in the world.
Since the release of SQL Server 1.0 in 1989, SQL Server has evolved to become a true, enterprise information platform. While it's core function is that of an RDBMS, SQL Server has become much more than that. SQL Server 2016 includes built-in business intelligence tools, as well as a range of analysis and reporting tools. This is on top of the database management tools such as database creation, backup, replication, security, and more.
This tutorial focuses more on the database management tools.

Database Management Tools

SQL Server comes with a number of tools to help you with your database administration and programming tasks.
Some typical database administration and programming tasks could include:
  • Create & maintain databases
  • Create & maintain tables
  • Create & maintain other database objects such as stored procedures, views, etc
  • Create & maintain and schedule data backups
  • Replication (eg, create a copy of the database)
  • Create & maintain users, roles, etc
  • Optimization tasks
These are some of many tasks that a database administrator (DBA) might need to perform. SQL Server provides the means for performing these tasks.

Client/Server Database Systems

SQL Server is a client/server DBMS, as opposed to a desktop system such as Access.
Client/server systems are designed to run on a central server - or servers - so that multiple users can access the same data simultaneously from across a network. Users normally access the database through an application.
For example, a web-based corporate CRM could be used by employees in various cities, or even countries, all reading and updating data via their browser.
Generally, it's the CRM application that provides the functionality to these users (for example, the CRM could be built using say, ColdFusion, HTML, and JavaScript). It is the database that stores the data and makes it available. However, SQL Server does include some useful features that can assist the application in providing its functionality.
Other client/server databases include MySQL, Oracle, and PostgreSQL, to name a few.

SQL Server 2016 Enhancements

SQL Server 2016 includes a number of enhancements from its predecessor, SQL Server 2014. It would probably take a whole new tutorial to list them in detail, but in a nutshell, the improvements in SQL Server 2016 over 2014 include:
Better security
With Always Encrypted, Row-Level Security, and Dynamic data masking
Higher availability
Including AlwaysOn Availability Groups, Cloud Witness, Storage Spaces Direct, Workgroup clusters
Improved database engine
TempDB enhancements, Query Store, Stretch Database,
More analytics
Tabular enhancements, R integration)
Various improvements to reporting
Search, custom branding, optimization for modern browsers, mobile, etc

SQL Server 2016 Editions

SQL Server 2016 comes in five editions:


  • Enterprise
  • Standard
  • Developer
  • Web
  • Express