By: Sergey Gigoyan | Updated: 2017-06-29 | Comments (1) | Related: More > SQL Server Management Studio
We are going to illustrate some common tips for working with SQL Server Management Studio (SSMS) which is the most popular tool for working with SQL Server databases. So, we are going to start the series of tips from the beginning – installation of SQL Server Management Studio. Usually SSMS is installed on the same machine (server) where the SQL Server Engine and other features are installed, but sometimes database developers do not have remote access to the database server and they need SSMS installed locally and connect to the remote databases. In this article we will show how to install SSMS on the local computer and how to connect to the remote SQL Server instances.
It is possible to install SQL Server Management Studio on local machine without having other SQL Server components. Below we will demonstrate different ways to install SSMS on a local machine and how to connect to the remote instance using SSMS.
Installing SSMS from SQL Server installation media
One of the ways to install SSMS is using SQL Server installation disk. Let’s illustrate this process by using SQL Server 2014 as an example. When SQL Server Installation Center is opens, choose “Installation” and then choose “New SQL Server stand-alone installation or add features to an existing installation”:
In the “Setup Role” window choose “SQL Server Feature Installation”:
After clicking “Next” from the features list choose only “Management Tools - Basic and Management Tools - Complete” as shown below:
After pressing the “Next” button several times and accepting the license terms the “Ready to Install” window appears as shown below:
There we can see configuration file path. Using this file we can install SSMS on other machines with the same configuration. Click install and wait for installation to complete. When it is successfully completed, the following window appears:
After the install, you can find it in the programs list under “Microsoft SQL Server 2014”:
Installing SSMS from configuration file
In the install example above, the SSMS installation configuration was created in file ConfigurationFile.ini. Opening this file we can see that only “SSMS” and “ADV_SSMS” is selected from features list:
Using this file we can install SSMS on other computers with the same configuration as it was installed on the original machine. In addition, it is possible to specify new features to install or remove. To install from the configuration file we open “cmd.exe” and run the following command:
C:\Users\Administrator>i:\setup.exe /ConfigurationFile="C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20170611_124546/ConfigurationFile.ini" /Q /IAcceptSQLServerLicenseTerms=”True”
As shown above the SQL Server installation media path and the configuration file path must be specified. The parameter “Q” means that installation will be silent, which means that we do not see an installation progress window and we will not be able to check or uncheck features. When we use silent installation it is important to set IAcceptSQLServerLicenseTerms=”True”.
After pressing “Enter” we will receive the following error: “/UIMode setting cannot be used in conjunction with /Q or /QS.” as shown below:
This error can be avoided by commenting out the UIMODE=”Normal” string in the configuration file as shown below:
Running the command again will start the installation of SSMS, however we will not be able to see the installation process as we chose the silent installation mode. After installation is finished, SSMS will be installed and in the programs list.
Downloading and installing standalone SSMS
It is also possible to download SSMS separately from SQL Server, in other words download a standalone version of SSMS. To do this we will use this link: https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms
We can see that SQL Server Management Studio 17.1 is available. Scroll down if you want to choose a previous version of SSMS:
The link for previous releases is: https://docs.microsoft.com/en-us/sql/ssms/previous-sql-server-management-studio-releases
Let’s download and install SSMS 2014 SP1:
After clicking the SSMS 2014 SP1 download link, the download will begin. When the download completes we run the “SQLManagementStudio_x86_ENU.exe” to extract the files and then run setup.exe in the extracted files. The SQL Server Installation Center opens and we can see that there are only SQL Server Management features available to install (assuming we are doing this test on a computer where SSMS is not installed):
So from here, we will be able to install SSMS like in the previous example.
In addition, when we are installing SSMS from the SQL Server 2016 Installation Center there is no SQL Server Management tools in the features selection list. There are separate options in the SQL Server 2016 Installation Center for management tools – “Install SQL Server Management Tools”. Also, it is possible to have more than one version of SSMS installed on the computer. For example you can have both – SSMS 2014 and SSMS 2016 on the same machine.
Connecting to the remote instance from SSMS
Now we are going to illustrate how to connect to the remote server using the locally installed version of SSMS (assuming the remote SQL Server is accessible from the local computer). To connect to the remote instance we are opening SSMS and in the “Connect to Server” window in the “Server name” field we should enter the remote server details in the following format:
<Remote Server name or IP address> / <Instance Name>, <port>
In the following image, we are going to connect to the remote server’s default SQL Server instance with an IP address of ’192.168.56.102’ that will use the default SQL Server port of 1433 and use SQL Server authentication:
After typing the password for the login we will be successfully connected:
If the server had a different port number such as 2040, we would connect as follows using the port number in the Server Name field.
As we can see it is possible to install only SQL Server Management Studio on a local machine (without installing the SQL Server database engine and its other components) and connect using SSMS to a remote SQL Server instance. Installation of SSMS is possible from the SQL Server Installation Center and it is possible to download and install only SSMS. Like other SQL Server features it is possible to install SSMS using a configuration file from the command line.
Check out this related information:
- Check out all of the tips on SQL Server Management Studio.
Last Updated: 2017-06-29
About the author
View all my tips