SQL Server
We will be using Microsoft SQL Server 2008 running on
iprojsrv.cs.washington.edu. Accounts on it have been set up for each of
you, and you have been given your user names and passwords. For the
first homework, you need to set up an interactive query session with
the server. For this, you will need access to SQL Server Management
Studio. The first thing you need to do is register the server, and
change your password.
Starting Management Studio
Your options are:
- Use any of the machines in the lab, they have the SQL Server
Management Studio installed.
- Remote desktop to aria2.cs.washington.edu and run SQL Server
Management Studio there.
- Install a copy of SQL Server Management Studio on your own
machine, and then
use tunnelling. As a student
you may be able to obtain a free copy of SQL Server (including
Management Studio) from MSDNAA.
Accessing SQL Server
Once you start the Management Studio do this
- Go to Start -> All Programs -> Microsoft SQL Server(client)
-> SQL Management Studio.
- A box labeled "Connect to Server" will show up.
- In the box labeled SQL Server, enter iprojsrv.cs.washington.edu
(unless you use tunnelling).
- Select the Use SQL Server Authentication option.
- Enter your login and password.
- Click OK.
- This will connect you to the server, on the left side of the
screen is an expanding tree.
- Expand the security node, then the logins node.
- Find your user name, right click and go to properties.
- Change your password then click OK.
First Homework
For the first homework, you will use Management Studio to connect
to the server, and run SQL queries. This will involve the following
steps:
- Log into the server using Management Studio. (You should know how
to do this if you changed your password.)
- Choose the database imdb on the left panel
- To start a new query click New Query in the upper left.
- Type in use imdb, and press F5 to execute the
statement. This will set your current database to be the imdb
database, used in the first homework.
- You can now enter and execute any SQL statements. Pressing F5
sequentially executes all the statements currently in the query pane,
and the results are displayed in the results pane.
The variant of SQL supported by SQL Server is called Transact-SQL.
In addition to executing all Transact-SQL statements, management Studio
can also be used to view query execution plans, statistics, and more.
Management
Studio Manual