Introduction to SQL Server Management Studio
Part one of a two-part series of blogs

Before you get into writing SQL Queries you should take some time to familiarise yourself with the application in which you'll be spending most of your time. This blog shows you the basics of SQL Server Management Studio.

  1. Introduction to SQL Server Management Studio (this blog)
  2. Working with Tabs

This blog is part of a complete SQL Server tutorial.  Don't forget that Wise Owl also run excellent training courses in SQL in the real world!

Posted by Andrew Gould on 30 April 2012 | 1 comment

You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Introduction to SQL Server Management Studio

SQL Server Management Studio is the application that allows you to do everything with a SQL Server installation.  You can use it to create, delete and maintain databases, write and execute queries and stored procedures, and a host of other tasks.  This short article introduces you to the basics of the application to help familiarise you with the Management Studio environment.

Opening Management Studio

Assuming you've installed Microsoft SQL Server 2005 or later on your computer you will have access to the Management Studio application from the Start menu.

Opening Management Studio

This machine has several versions of SQL Server installed. Here we're opening the version of Management Studio that was installed along with SQL Server 2008 R2.

 

Connecting to a Server

When you choose to open Management Studio, before you can start working with the application, you are asked to connect to a server.  You don't have to do this at this stage but it makes sense to do so and the diagram below explains how:

Connecting to a server

This dialog box allows you to connect to a server. The options shown are described below.

  1. Choose the type of server to which you want to connect.
  2. Type in or select the name of the server from this drop down list.
  3. Choose the type of authentication you would like to use.  You may be able to use your Windows credentials by selecting Windows Authentication from this list.  Alternatively, you'll need to select the option shown and type in a login name and password in the appropriate boxes.
  4. Click Connect to connect to the selected server.

Once you have followed the steps above you will see the server you selected appear at the left hand side of the screen.

Selected server

The server you selected will appear in the Object Explorer window at the left of the screen.

 

Disconnecting from and Reconnecting to a Server

You can disconnect from a server by right-clicking on the server name and choosing the option shown in the diagram below:

Disconnecting from a server

Right-click on the name of the server and choose the option shown here to disconnect from it.

 

You can reconnect to a server using the Connect tool at the top of the Object Explorer window, as shown below:

Connecting to server

Choose the type of server to which you want to connect.

 

When you choose an option from the list you'll be presented with the same dialog box you see when you open Management Studio for the first time.

Opening and Closing Windows

You can close any windows in Management Studio by clicking the cross in the top right hand corner of the window.

Closing window

Click the cross in the top right hand corner to close the selected window.

 

To open a window that is closed you can use the View menu at the top of the screen.

Opening windows

Click on the name of the window you want to open. You can also use the keyboard shortcuts listed next to certain windows to open them.

 

Auto-Hiding Windows

Rather than closing and reopening windows you might find it easier to auto-hide them instead.

Auto hide a window

To auto-hide a window, click the vertical pushpin icon in the top right hand corner.

 

Once you have chosen to auto-hide a window it will collapse into a tab at the edge of the screen.  The diagram below shows how to bring it back.

Mouse pointer over tab Window not auto-hidden
Move the mouse cursor over the tab... ...to make the window pop out.

You can stop the window from auto-hiding by clicking the pushpin icon again at the top right hand corner of the window.

Pin window in place

Click the horizontal pushpin icon to pin the window in place.

 

This blog has 1 comment

Comment added on 07 September 2012 at 05:06 GMT

When I launched the SQL, it did not let me go to step 2, which is connect to the server. The server name space (2) is blank and it did not give me any drop downs.

subbu

Reply from Andrew Gould
The drop down list isn't always populated automatically.  You can, and it sounds as though you will have to, type in the name of the Server to which you want to connect.

A full-blown discussion forum is being built for this site, which will allow you once more to add comments and discussion threads.