GETTING
STARTED WITH SQL SERVER
We will be using Microsoft SQL Server running on iisqlsrv.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 client tools, which are installed on the machines in the undergrad
labs. You will use "Enterprise Manager" for administrative
tasks, and "Query Analyzer" for interactive querying. The first thing you
need to do is register the server, and change your password, which is described
here.
For the first homework, you
will use Query Analyzer to connect to the server, and run SQL queries. This will
involve the following steps.
- Go to Start->All programs->Microsoft SQL Server(client)->Query
Analyzer.
- A box labeled Connect
to SQL Server will show up.
- In the box labeled SQL Server, enter IISQLSRV .
- Select the Use SQL Server Authentication option.
- Enter your login and password.
- Click OK.
- This will connect you to the server, and a query window will open.
- 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, Query Analyzer can also be used to view query execution
plans, statistics, and more.
Query Analyzer Manual
You are welcome to
create and play with your own databases. Besides using SQL statements for this,
you can also use Enterprise Manager, which is a convenient graphical tool for
database design, modification and administrative tasks. To access the server
using Enterprise Manager, on the Console Root, expand
Microsoft SQL Servers, then expand SQL Server Group, and finally expand IISQLSRV.
Enterprise Manager Manual