The A – Z Guide Of CONNECT TO SQL SERVER MANAGEMENT STUDIO

SQL Server Management Studio is a client tool that can be used to write and execute SQL queries in the Database SQL editor. To connect to SQL Server Management Studio We need to do the following things.

  • Click on the start button in your computer
  • Click on All Programs
  • Choose Microsoft SQL Server 2008 or 2008 R2 (Depending on the version you have it in your local machine)
  • Click on SQL Server Management Studio option

Here you can see connect to Server SQL Server Management Studio.

Connect to SQL Server Management Studio
  • Select the Database Engine as the Server Type in the dropdown. Apart from these, there are other options that you can see here are Analysis Services, Reporting Services, and Integration Services.
  • Now choose server type as Database Engine.
  • After that, you need to specify the name of the server.
  • After that, we can specify the name or the server or Server IP Address. In case you have SQL Server already installed on your local machine then you can specify it as “local” or just. (dot) or IP Address.
  • Here Server name is a local or single dot or IP Address.
  • Now select an Authentication type. The options available for you here depends on how you have installed SQL Server During your installation.
  • If you have chosen dual-mode authentication, you will have two authentications that are Windows Authentication and SQL Server Authentication.
  • In case you would have chosen Windows Authentication, you don’t have to enter the user name and password for that, else you can enter the user name and password and then click on connect option to connect to SQL Server Management Studio.

Now you are connected to SQL Server. Next click on New Query, on the top left-hand corner of SQL Server Management Studio. It will open a new query editor window, where we can write your SQL queries and execute them.

SQL Server Management Studio is a client tool to access the database server. Typically database servers will be on a separate machine, and developers or clients can connect to this server using SQL Server Management Studio from their respective computers.

Client Server Connection using SQL Server Management Studio

How to Connect to SQL Server Command-Line?

  • Using the Start menu click Run option. In the Open box type cmd using your keyboard, and then click OK to open a Command Prompt editor.
  • If you have not connected to the specific instance of the SQL Server Database Engine before, you may need to configure SQL Server to accept connections.
  • Now type sqlcmd in the command window.
  • Press the enter button.
  • You now have a trusted connection established to the default instance of SQL Server which is running on your computer.
  • 1> is the sqlcmd prompt that indicates the line number of the command line. Each time you press ENTER, the number increases by one.
  • To end the sqlcmd window, enter EXIT at the sqlcmd prompt
Connect SQL Server Command Line

Start the sqlcmd utility and connect to a named instance of SQL Server

  • Open a Command Prompt window using run, and type sqlcmd -SmyServer\instanceName and then Replace myServer\instanceName with the name of the computer and the instance of SQL Server that you want to connect to.
  • Press ENTER.
  • The sqlcmd prompt 1> indicates that you are connected to the specified instance of SQL Server.

I hope you like this article. In case of any queries, you can comment in the comment section.

Would you like to know how to connect to MSSQL Database? you can read this article.

Thank You.

Leave a comment