SQL Server Management Studio (SSMS)
MS SQL Server Management Studio is a workstation or a client tool which is used to connect to and manage your SQL Server
SQL Server Management Studio (SSMS) is a windows software or a client tool used to connect and work with our SQL Server from a graphical interface instead of using the command line. Microsoft SQL Server 2005 launched the management studio to work with SQL Server and Azure SQL databases.
It allows DBAs and database developers to configure, manage, and administer all components within SQL Server. Its main functionality is to create databases and tables, execute SQL queries for inserting, updating, and deleting data, creating and managing stored procedures, triggers, views, and cursors. It also enables us to set privileges (securities) on databases and their objects.
SSMS also includes tools for deployment, database health monitoring, and reporting. It includes SQL Profiler, which allows us to examine the performance of our SQL databases. It’s also possible to use it to schedule background work. If we want to connect to a remote SQL Server instance, we’ll need this GUI tool or similar software. It is used by Administrators, Developers, Testers, etc. The latest version of SQL Server Management Studio is SSMS 18.8 RC. If we have installed a previous version, we just need to install SSMS 18.8 upgrades.
SSMS System Requirements
The following are the requirements to install the current release of SSMS when used with the latest available service pack:
It will support the below Operating Systems:
- Windows 10 (64-bit) version 1607 (10.0.14393) or later
- Windows 8.1 (64-bit)
- Windows Server 2019 (64-bit)
- Windows Server 2016 (64-bit)
- Windows Server 2012 R2 (64-bit)
- Windows Server 2012 (64-bit)
- Windows Server 2008 R2 (64-bit)
Before installing it on your system, we must have the following hardware:
- 8 GHz or faster x86 processor. For better use, it is recommended to have Dual-core.
- It requires a minimum of 2 GB RAM, but 4 GB is recommended (if it runs on a virtual machine, a minimum of 2.5 GB is required).
- We must have a minimum of 2 GB up to 10 GB space on the hard disk.
How to Download and Install SQL Server Management Studio (SSMS)
We can use the following steps to download and install Microsoft SQL Server Management Studio (SSMS) in the Windows system:
Step 2: Once the file has been downloaded, it will be named “SSMS-Setup-ENU.exe.” Now, double-click on it to continue.
If you see the prompt message “Do you want to allow the following to make a change this computer? Say YES.
Step 3: We will see a below window. Here, we can change the installation location and then click the ‘Install’ button for installing SQL Server Management Studio (SSMS) on your device.
Step 4: The installation process will start. We will see the progress of the packages and the overall progress on the below screen. Since it downloads the necessary packages from the internet, the installation can take some time.
Step 5: When SSMS Setup is finished, it will show the screen below with the “Setup Completed” message. It’s possible that we may prompt us to restart our computer.
How to access SQL Server Management Studio
We can use the following steps to access SQL Server Management Studio (SSMS):
Go to Start Menu>Programs>Microsoft SQL Server Tools 18> Microsoft SSMS 18.
The ‘Connect to Server’ dialogue screen will appear in front of us when we start SSMS. Set the Server name and Authentication type of the SQL Server we want to connect to on this screen, then click the Connect button to be connected to ‘Data Management Studio’. Here the server name defaults to the name chosen during the installation of the MS SQL server.
Let us understand each field of the above screen in detail:
Server type: It is a dropdown menu that allows us to choose one of four MS SQL services options. Here we’ll be working on the ‘Database Engine’ that enables us to create and work with databases. Some of the examples of other server types are Analysis, Reporting, and Integration Services.
Server name: It is the server’s name where MS SQL Server is installed, and we will need to connect with that server. In most cases, we refer to the server name as “Machine name/Instance.” Here we had given the Instance name to the SQL Server instance during installation.
Authentication: If we use “Windows Authentication” during SQL Server’s installation, this option is set to “Windows Authentication.” Authentication will be set to “SQL Server Installation” if we have chosen “Mixed Mode (Windows Authentication & Windows Authentication).”
User namePassword: These two fields will be needed when the Authentication is set to other than “Windows Authentication,” such as “SQL Server Installation.”
How to access SQL Server Management studio using Command line?
We can also use the Window Command Line tool to launch SQL Server Management Studio. We can do this by using the complete path to ssms.exe. The default location and file name are as follows:
The steps to access Management Studio through the command line are as follows:
- Type CMD into the Search box to open Command Prompt.
- Next, we need to type the complete path followed by ssms.exe and press Enter.
Immediately, we will see the ‘Connect to Server’ screen similar to the one we have described above.
Introduction to Data Management Studio IDE
The Data Management Studio launch screen will look like below. We will discuss each section in detail.
1. Query Editor
This section is used to write all of our queries. MS SQL Server offers interactive recommendations for tables, columns, and other items for easy queries creations and a variety of other features.
2. Object Explorer
The Object Explorer shows the database objects contained on the server in a tree format. For quick reference, this section lists all of the Databases, Security, and Server Objects. We can see each object’s components by simply pressing the + icon to the left of the object to expand it.
3. Databases Selection Dropdown
It is a dropdown option that allows the user to choose the database to run our queries.
4. Execute button
It is an execution button that allows the user to execute the query and return the results.
5. Cancel Executing Query
It is a button that is used to stop the execution of the query.
It is a button used to validate the query’s syntax but doesn’t check the database objects.
7. Changing query result destination
This button group allows us to set the query result’s destination. There are three options available:
- Results to Grid
- Results to Text
- Results to File
8. Comment/Uncomment out the Selected Lines
These buttons allow us to comment or uncomment the lines of code we have chosen. For example, to see the line numbers of the code in the query editor.
Important points to remember
The following points must be useful while using the SQL Server Management Studio:
- SSMS is a standalone application that doesn’t refer to any particular SQL Server version. For example, we may use SMMS Version 18 with SQL Server 2017 and SQL Server 2016.
- If we write the larger code, it reduces the readability. In that case, we need to make use of comments for better readability. We can comment out a line, just putting “–” in front of it.
- A sudden shutdown or a device failure may result in data loss. We can minimize the data loss by setting the ‘AutoRecover‘ option checked. We can also configure the AutoRecover data time-period and the number of days this information is stored before being deleted. We can set the AutoRecover option as below:
SSMS Versions and Updates
The first version of SSMS was released with SQL Server 2005. With SQL Server 2008, SQL Server 2012, and SQL Server 2016, SSMS is an integral part of SQL Server. Microsoft began the first numerical versioning sequence in 2016, with the SSMS version number 16.3. Version numbers for all series include 16.x, 17.x, and 18.0.
The latest series, which is 18.0, have the following versions: 18.0 (Preview 4), 18.0 (Preview 5), and 18.0 (Preview 6). As of March 2021, the current version of SQL Server Management Studio is SSMS 18.8 RC.