Installing SQL Server 2005 Express Edition
After making sure IIS, the .NET Framework, and the SDK are installed correctly,
its time to move forward and install the next piece of software that youll be
using as we work through this book: SQL Server 2005 Express Edition.
SQL Server 2005 is Microsofts database solution for medium to large companies
and enterprises. SQL Server 2005 can be quite expensive, it generally requires
its own dedicated database server machine, and, at times, it necessitates that a
certified database administrator (DBA) be employed to ensure its maintenance;
yet it does offer a robust and scalable solution for larger web applications.
For the examples in this book, well use SQL Server 2005 Express Edition, which
is free and sufficiently powerful for our needs. Unlike the expensive versions,
SQL Server 2005 Express Edition doesnt ship with visual management utilities,
but you can use another free tool from MicrosoftSQL Server Management
Studio Express, which well install next)for these purposes.
You can install SQL Server 2005 Express Edition as follows:
1. Navigate to http://msdn.microsoft.com/vstudio/express/sql/, and click the
Download Now link.
2. In the next page, you can choose between SQL Server 2005 Express Edition,
and SQL Server 2005 Express Edition with Advanced Services. The former
will be fine for our purposes. Your system should meet the necessary require-
ments, so go ahead and click Download.
3. Once the download has completed, double-click the downloaded executable
file, and follow the steps to install the product. Its safe to use the default
options all the way through, though it is a rather long process.
Provided that everything goes well, SQL Server 2005 Express Edition will be up
and running at the end of the process. Like IIS, SQL Server runs as a service in
the background, accepting connections to databases instead of web pages. The
SQL Server is accessible at the address (local)\SqlExpress.
Installing SQL Server Management Studio Express
In order to use your SQL Server 2005 install effectively, youll need some sort
of administration tool that will allow you to work with your databases. SQL
22
Chapter 1: Introducing ASP.NET and the .NET Platform
Server Management Studio Express is a free tool provided by Microsoft to allow
you to manage your installation of SQL Server 2005.
To install SQL Server Management Studio Express, follow these steps:
1. Navigate again to http://msdn.microsoft.com/vstudio/express/sql/, and click
the Download Now link.
2.
This time, download the SQL Server Management Studio Express edition that
corresponds to the SQL Server 2005 version that you installed previously.
3. After the download completes, execute the file and follow the steps to install
the product.
Once its installed, SQL Server Manager Express can be accessed from Start > All
Programs > Microsoft SQL Server 2005 > SQL Server Management Studio Express.
When executed, it will first ask for your credentials, as Figure 1.12 illustrates.
Figure 1.12. Connecting to SQL Server
By default, when installed, SQL Server 2005 Express Edition will only accept
connections that use Windows Authentication, which means that youll use your
Windows user account to log in to the SQL Server. Because youre the user that
installed SQL Server 2005, youll already have full privileges to the SQL Server.
Click Connect to connect to your SQL Server 2005 instance.
23
Installing SQL Server Management Studio Express
Figure 1.13. Managing your database server
After youre authenticated, youll be shown the interface in Figure 1.13, which
gives you many ways to interact with, and manage, your SQL Server 2005 in-
stance.
SQL Server Management Studio lets you browse through the objects inside your
SQL Server, and even modify their settings. For example, you can change the
security settings of your server by right-clicking the COMPUTER\SQLEXPRESS (where
COMPUTER is the name of your computer), choosing Properties, and selecting
Security from the panel, as shown in Figure 1.14.
SQL Server and Instances
You can run multiple SQL Servers on the one computer simultaneouslyeach
SQL Server is called an instance of SQL Server. How is this useful? Imagine
you have a production server that runs two applications with two separate
databases on the same instance of SQL Server. If, for some reason, we need
to restart SQL Server for the first application, the second applications
database will become unavailable while the restart is taking place. If the
second applications database was operating on a second instance of SQL
Server, we wouldnt have such a problemthe second application would
continue working without missing a beat.
Each instance of SQL Server requires a name. The default instance name for
SQL Server 2005 Express Edition is SQLEXPRESS. When connecting to your
24
Chapter 1: Introducing ASP.NET and the .NET Platform

Get Build Your Own ASP.NET 2.0 Web Site Using C# & VB, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.