Starting with SQL Server
We will be using Microsoft SQL Server 2005 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, which is installed on the machines in the undergrad labs. You will it for
both administrative tasks and interactive querying. The first thing you need to
do is register the server, and change your password.
- Go to Start -> All Programs -> Microsoft SQL Server(client) -> SQL Management
- A box labeled "Connect to Server" will show up.
- In the box labeled SQL Server, enter IPROJSRV.cs.washington.edu.
- 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
- Expand the security node, then the logins node.
- Find your user name, right click and go to properties.
- Change your password then click OK.
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 movies, and press F5 to execute the statement. This will set
your current database to be the movies 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.
You are welcome to create and play with your own databases. You can either use SQL
statements for this, or you can use Management Studio.