Вы находитесь на странице: 1из 4

Murachs SQL Server 2008: Installation instructions 1

Appendixes A & B

How to install the required


software, files, and
databases for this book
Some of the instructions for installing SQL Server Express and the sample
databases have changed since this book was published. So this document replaces
some of the information thats in the appendixes and details the current
procedures to use.
Murachs SQL Server 2008: Installation instructions 2

The main URL for the SQL Server 2008 Express downloads
http://www.microsoft.com/express/Database/

How to download and install SQL Server 2008 Express with Tools
1. Go to the URL shown above.
2. Download the x86 installation file for SQL Server Express 2008. To do that, click on
the x86 button for the Database With Management Tools option. By default, it has
a name of SQLEXPWT_x86_ENU.exe.
3. Run the installation file and respond to the resulting dialog boxes. (If you dont see the
resulting dialog box, it may be hidden behind your browser window.)
4. At the SQL Server Installation Center dialog, select the Installation category. Then,
select the New installation option to start the SQL Server 2008 Setup wizard, and
respond to the resulting dialog boxes. If there is an older instance of SQL Server with
this name, you can select the Upgrade from SQL Server 2000 or 2005option.
5. At the Feature Selection step, select all available features. Or, if there is already an
instance of SQL Server 2008 installed on your system, you can deselect the Database
Engine Services check box. This allows you to install the Management Studio tools
without installing another instance of SQL Server, and it allows you to skip the rest of
this procedure.
6. At the Instance Configuration step, create a named instance with a name of
SQLEXPRESS. If there is an older instance of SQL Server with this name, you can
create a named instance with a name of SQLEXPRESS2008, or you can uninstall the
old instance and install the 2008 instance with the default name of SQLEXPRESS.
7. At the Server Configuration step, select an account name for the SQL Server Database
Engine service. If you want to run SQL Server on your computer, you can select NT
AUTHORITY\SYSTEM or NTAUTHORITY\LOCALSYSTEM. (The options may
vary depending on your system.)
8. At the Database Engine Configuration step, you can click the Add Current User button
to add the current user as a SQL Server Administrator.
9. Continue responding until the installation is complete. (If you are prompted to select
the server name, you can expand the + Database Engine option and select the
COMPUTER-NAME\SQLEXPRESS option.)

Notes
This book assumes that the SQL Server 2008 Express database engine is installed with a
name of SQLEXPRESS.

Figure A-2 How to install SQL Server 2008 Express with Tools
Murachs SQL Server 2008: Installation instructions 3

How to download and install the SQL Server 2008 Books Online
1. Search the Internet for SQL Server 2008 Books Online. In the results, click on the
link that begins with this URL:
http://www.microsoft.com/downloads/details.aspx
This should take you to the Microsoft Download Center page for downloading SQL
Server 2008 Books Online.
2. Click the Download button.
3. Save the setup file on your hard drive.
4. Run the setup file and respond to the resulting dialog boxes.

Description
SQL Server 2008 Books Online is an optional member. You only need to install it if you
want to store this documentation on your system. Otherwise, you can read the
documentation online.

Figure A-3 How to install SQL Server 2008 Books Online


Murachs SQL Server 2008: Installation instructions 4

How to download the source code and databases


1. Go to www.murach.com, and go to the page for Murachs SQL Server 2008 for
Developers.
2. Click the link for FREE download of the book examples.
3. Select the All book files link and respond to the resulting pages and dialog boxes.
This will download a setup file named sql8_allfiles.exe onto your hard drive.

How to install these files


1. Use the Windows Explorer to find the setup file on your hard drive.
2. Double-click this file and respond to the dialog boxes that follow. If you accept the
defaults, this installs the files into the directory shown below.

The default installation directory and two subdirectories


C:\Murach\SQL Server 2008
\Batches
\Databases

How to attach the databases


1. If youre using Windows 7 or Vista, you may need to give permissions to the current
user. To do that, use the Windows Explorer to navigate to the C:\Murach\SQL Server
2008\Databases folder, right-click on this folder, and select the Properties command.
Then, select the Security tab, select the current user, click the Edit button, and give all
permissions to that user.
2. Use the Windows Explorer to navigate to the C:\Murach\SQL Server 2008\Batches
folder and double-click the batch file named attach.bat. If no error is displayed, the
databases were successfully attached. Otherwise, you can use the error message thats
displayed to determine the cause of the error.

Description
For these batch files to execute, the database server must be running. By default, the
database server is automatically started when you start your system. If it isnt running on
your system, you can start it as described in chapter 2.
If you receive an error that says, the system cannot find the path specified, the database
files arent stored in the correct directory. To fix this problem, you can move the database
files into the correct directory, or you can edit the batch and sql files as necessary so they
point to the directory where the files are stored.
If you receive an error that indicates that the database is in use, you may need to close any
applications that are using the database.
If you receive an error that says, CREATE DATABASE permission denied in database
master, you may need to turn off the User Account Control feature as described in
appendix B.
If you cant get the batch files to work correctly, you can use the SQL Server 2008
Management Studio to attach and detach the databases as described in chapter 2.

Figures B-1 and B-2 How to install the source code and attach the databases