0% found this document useful (0 votes)
14 views52 pages

CH 02

Uploaded by

vuthnarak2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views52 pages

CH 02

Uploaded by

vuthnarak2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Installing SQL Server 2005

Installing SQL
Server 2005
Objectives
• Learn how to prepare for a SQL Server 2005 installation.
• Understand what is involved in upgrading an earlier version of SQL
Server to SQL Server 2005.
• Install a named instance of SQL Server 2005.
• Find out how to configure the server after installation.

The files associated with this chapter are located in the following folder:
{Install Folder}\Installing
This chapter does not include a lab.

Microsoft SQL Server 2005 2-1


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Preparing for Installation


SQL Server 2005 is an easy product to install⎯the setup program walks you
through all of the necessary steps. However, you should ensure that the
machine and operating system on which you install SQL Server are adequate
for the task. Microsoft publishes minimum disk and memory requirements, but
bear in mind that these are minimal, not optimal.

Hardware and Software Requirements


Table 1 shows the list of hardware requirements for installing SQL Server.

Computer Intel® Pentium III or compatible processor, 600 MHz or


higher.
Memory (RAM) At least 512 MB is required for most versions and operating
systems. If you are running the Express edition, you can get by
with 192 MB. For an active server, 1 GB or more is
recommended.
Hard disk space Database engine and data files, replication, and full-text search:
150 MB
Analysis services and data files: 35 MB
Reporting Services and Report Manager: 40 MB
Notification Services, engine components, client components,
and rules components: 5 MB
Integration Services: 9 MB
Client components: 12 MB
Management tools: 70 MB
Development tools: 20 MB
SQL Server Books Online and SQL Server Mobile Books
Online: 15 MB
Samples and sample databases: 390 MB
Table 1. Hardware requirements for installing SQL Server 2005.

The most cost-effective way of optimizing performance on SQL Server is


usually to throw some money at the hardware. Unfortunately, many companies
and organizations make it harder to get approval for hardware expenditures
than for consulting, but doubling the RAM on your server will usually help
more than paying a consultant to tune your queries. Realistic RAM
requirements for SQL Server range from 1 gigabyte to many gigabytes,
depending on usage levels.

2-2 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Preparing for Installation

Network hardware can be as important for performance as your server


hardware, so be sure that you have adequate bandwidth to meet your projected
needs.

If you purchase disk drives, consider RAID arrays to add redundancy and
thereby increase reliability, and check that your disk controller is intended for
database usage. Some write-caching disk controllers can endanger database
integrity.

Operating System Requirements


It is generally not a good idea to install SQL Server on a computer that is also
a domain controller, because the overhead of maintaining and replicating the
database of network accounts, plus the demands of authenticating user logons,
will compete with SQL Server for system resources. In fact, SQL Server
should be the only server software installed on a heavily used database server.

The operating system requirements for SQL Server 2005 are listed in Table 2.

Microsoft SQL Server 2005 2-3


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

SQL Server Operating System


Edition

Enterprise Edition Windows 2000 Server, Datacenter, or Enterprise Editions


with SP4; Windows 2003 Server, Enterprise, or Datacenter
Edition with SP1; or Windows Small Business Server 2003,
Standard or Premium Edition
Standard Edition Windows 2000 Professional, Server, Advanced Server, or
Datacenter Edition with SP4; Windows XP Professional,
Media, or Tablet Edition with SP2; Windows 2003 Server,
Enterprise, or Datacenter Edition with SP1; or Windows
Small Business Server 2003, Standard or Premium Edition
Workgroup Edition Windows 2000 Professional, Server, Advanced Server, or
Datacenter Edition with SP4; Windows XP Professional,
Media, or Tablet Edition with SP2; Windows 2003 Server,
Enterprise, or Datacenter Edition with SP1; or Windows
Small Business Server 2003, Standard or Premium Edition
Express Edition Windows 2000 Professional, Server, Advanced Server, or
Datacenter Edition with SP4; Windows XP Home,
Professional, Media, or Tablet Edition with SP2; Windows
2003 Server, Enterprise, Datacenter, or Web Edition with
SP1; or Windows Small Business Server 2003, Standard or
Premium Edition
Developer Edition Windows 2000 Professional, Server, Advanced Server, or
Datacenter Edition with SP4; Windows XP Home,
Professional, Media, or Tablet Edition with SP2; Windows
2003 Server, Enterprise, or Datacenter Edition with SP1; or
Windows Small Business Server 2003, Standard or
Premium Edition
Client Tools Only Windows 2000 (all versions) with SP4 or later, or all later
(includes option to versions of Windows
select components)
Table 2. The operating system requirements for installing SQL Server 2005.

NOTE You can install any edition of 32-bit SQL Server 2005 on
Windows 2003 64-bit X64 Standard Edition with SP1; SQL
Server must run on Windows on a Windows (WOW) 32-bit
subsystem of a 64-bit server.

NOTE A 64-bit version of SQL Server 2005 is also available in the


Enterprise, Standard, or Developer editions. These 64-bit versions
require a 64-bit version of Windows 2003 or later. Refer to SQL
Server Books Online for details.

2-4 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Preparing for Installation

Internet Software Requirements


SQL Server 2005 requires Internet Explorer 6.0 with SP1 for all editions, as
well as Microsoft Management Console (MMC) and HTML Help. Some of the
optional components in SQL Server may have other prerequisites. For
example, Reporting Services requires Internet Information Services (IIS) and
ASP.NET 2.0.

TIP: Internet Explorer does not have to be the default browser on the target
machine.

Network Software Requirements


Running SQL Server 2005 requires no additional network software. Each of
the Microsoft operating systems has the required built-in network software.
Each instance of SQL Server supports the shared memory (other than on
failover clusters), named pipes, TCP/IP, and VIA network protocols.

TIP: Unlike earlier versions, SQL Server 2005 does not support Banyan VINES
Sequenced Packet protocol (SPP), Multiprotocol, AppleTalk, or NWLink
IPX/SPX network protocols. Any client software that currently connects to
earlier versions of SQL Server via these protocols must switch to one of the
supported protocols.

Setting Up the Service Accounts


The core SQL Server 2005 programs run as Windows services. Depending on
the options you install, you may have as many as ten Windows services. In
order to run in Windows, each of these services must be assigned a Windows
user account. The permissions of the assigned account determine the security
environment in which each service runs. This means that your decisions about
which service accounts to use are among the most critical installation decisions
you make in securing your server.

TIP: The important security principle least privilege mandates that the account you
use for each service has the lowest set of permissions possible for the service
to run.

You can use four Windows accounts for SQL Server services:

Microsoft SQL Server 2005 2-5


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

• Domain User Account: If the SQL Server instance needs to


communicate over the network—for example, to use replication,
backup to network drives, or send e-mail—it must use an account that
can access the local network. This is probably the best option for most
SQL Server installations, giving you the most flexibility and control
over security.
• Local System Account: The omnipotent account that Windows uses
for most of its internal operations, with access to just about every
corner of the machine. While convenient to use—you can be sure that
the SQL Service instance has access to all Windows features—it is the
worst possible choice from a security standpoint. An attacker who
gains control of SQL Server would have complete access to the
machine. Never use this account!
• Local Service Account: A built-in Windows account that has minimal
permissions that are similar to those of the Users group. It can access
the network but with severe restrictions. This account could be
appropriate for use with SQL Server instances that don’t need to
access network resources.
• Network Service Account: Similar to the Local Service account
except that it accesses the network using the credentials of the
computer account. This account may be usable, but a Domain User
account would give you more flexibility and security.
When you specify the type of account to use for each service, the installation
wizard takes care of granting to the selected account whatever permissions and
privileges are required for each service. These are documented in SQL Server
Books Online under the Setting Up Windows Service Accounts topic.

Multiple Instances
One of the most powerful features of SQL Server is the ability to install
multiple instances of the SQL Server relational database engine on a single
computer. However, there are a few things you need to know before you install
multiple SQL Server instances.

You can install one default instance and multiple named instances, or multiple
named instances with no default instance. The only difference between the
default and the named instance is that to access the default instance you use
only the machine name; a named instance requires the machine name and the
instance name.

Instances other than the default instance must be SQL Server 2005, but the
default instance can be SQL Server 6.5, 7.0, 2000, or 2005. Here are a few
examples of how you can configure a single computer:

• A default instance of SQL Server version 7.0 or 2000, with multiple


named instances of SQL Server 2005. Only SQL Server 2005 can
operate as a named instance.

2-6 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Preparing for Installation

• A default instance of SQL Server 2005 with up to 15 or 49 named


instances, depending on which SQL Server edition you are using.
• No default instance and up to 16 or 50 named instances, depending on
which SQL Server edition you are using.

NOTE The limit on the number of SQL Server 2005 instances you can
install depends on which edition of the product you are using. The
Enterprise and Developer editions have a limit of 50 instances,
including both default and named instances. The Standard,
Workgroup, and Express editions have a limit of 16 instances.

Multiple Instance Scenarios


Implementing multiple instances of SQL Server gives you great flexibility in
the kinds of SQL Server applications you can develop and distribute. Here are
a few examples of how you might find multiple instances useful:

• Continue to run existing applications on earlier versions of SQL


Server side-by-side with a SQL Server 2005 server on the same
machine at the same time.
• Run multiple instances of SQL Server on the virtual server of a SQL
Server failover cluster. When you install SQL Server on each
computer in a cluster, you create a named instance to distinguish that
installation from the other instances of SQL Server that are on the
same virtual server. Clustering is described fully in Failover
Clustering in SQL Server Books Online.
• Maintain a separate independent SQL Server environment for
development and testing on the same computer that holds your
production server.
• Roll out a secured SQL Server database in a sandbox environment
where administrative rights are curtailed. Structure security differently
for each instance, with different administrators. One of the problems in
past versions of SQL Server for independent software vendors and
application developers was that the system administrator in SQL
Server is all-powerful. Multiple instances provide a way to curtail
administration on a server instance.
• Install software that comes bundled with the Express edition of SQL
Server on a machine that already has a running server.
The principal drawbacks of multiple instances are that administration becomes
more complex, and multiple instances consume more resources than a single
installation.

Microsoft SQL Server 2005 2-7


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Using Named Instances


Each instance has its own set of system and user databases. Applications
connect to each instance the same way they connect to different instances
running on different computers, but they must use a new naming convention
(server\instance) to specify non-default instances. If you have a default
instance, it has the same name as the computer it’s on, just as in older versions.
However, to connect to a named instance, a client must use the following
syntax:

MyComputer\MyInstance

Use just the computer name to connect to the default instance.

Instance Components
Each instance has its own database engine, supporting components, and system
and user databases; but only one set of client tools services all instances. In
other words, you have only one Management Studio, Profiler, and so on.

The default instance keeps the name MSSQLServer for the SQL Server
service. For named instances, the service name is changed to
MSSQL$InstanceName where InstanceName is the name of the instance.
This allows you to start and stop each instance independently of other
instances on the same server and to manage events, schedules, and
notifications separately. You can start and stop each of the instances from a
single copy of the SQL Server Configuration Manager. You must use a single
copy of the Management Studio to control objects in all instances on the
computer or cluster, and you use a single copy of the SQL Server
Configuration Manager to manage the network addresses for all of the
instances.

The directory and registry structures that support each instance all use the
instance name you provide during installation to distinguish one instance from
another.

When multiple instances are installed, the computer or cluster has only one
SQL Server 2005 program group (Microsoft SQL Server 2005) and only one
copy of each of the SQL Server utilities (in the program group), as well as only
one copy of Books Online.

NOTE If you run SQL Server version 6.5 as a default instance and run
one or more named instances of SQL Server 2005, you need two
SQL Server program groups. The SQL Server 2005 program
group executes the SQL Server 2005 tools, and the SQL Server
version 6.5 program group runs the SQL Server 6.5 tools.

2-8 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Preparing for Installation

TIP: If you intend to install only a single instance of SQL Server 2005 on a
computer, make it the default instance. It’s easier to manage that way, and the
instance name you use to connect from client applications is simply the
machine name.

Microsoft SQL Server 2005 2-9


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Upgrading an Earlier Version


If you are currently running an earlier version of SQL Server you have two
choices when installing SQL Server 2005: run SQL Server 2005 as a named
instance, in which case the existing SQL Server remains available, or upgrade
the existing version. This section will discuss the upgrading option.

TIP: If you do not want to upgrade a SQL Server database from a previous version,
you can set the sp_dbcmptlevel option to run the database in SQL Server
2005 as though it were running in a previous version. The syntax is:

sp_dbcmptlevel [ [ @dbname = ] name ]


[ , [ @new_cmptlevel = ] version ]

The possible version values are 70 for SQL Server 7.0, 80 for SQL Server
2000, and 90 for SQL Server 2005. For example, execute this statement to
run the Northwind database in SQL Server 2000 mode.

EXEC sp_dbcmptlevel 'AdventureWorks', '80';


GO

If you do use compatibility mode for a database, you will not be able to add
queries that take advantage of new T-SQL features.

Considerations
There are several things to consider when you plan to upgrade an existing
version of SQL Server:

• Upgradeable Versions: You can upgrade SQL Server 2000 Service


Pack (SP) 3 or later or SQL Server 7.0 SP4 or later. If you are running
any other version of SQL Server, you’ll first have to upgrade it to one
of these versions before installing SQL Server 2005.
• Upgrade Paths: The available upgrade paths for various editions of
SQL Server may limit your options. In general, you are limited to
upgrading to the same or similar editions of SQL Server 2005 as the
earlier version. For example, you can only upgrade from SQL Server
2000 Enterprise Edition to SQL Server 2005 Enterprise Edition. See
Version and Edition Upgrades in Books Online for more information.

2-10 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Upgrading an Earlier Version

• Backward Compatibility: While Microsoft always takes backward


compatibility seriously when releasing new versions of products, an
upgrade to SQL Server 2005 is likely to break a few things in your
existing databases and applications. You may experience dropped
features, changes that are likely to break existing code, and behavioral
changes that are likely to produce different results.

TIP: You will have to review and update existing code to accommodate these
backward compatibility changes. Further, some features have changed in SQL
Server 2005 and others have been deprecated for removal in a future version
of SQL Server. See the Backward Compatibility topic in Books Online for
extensive lists of both of these types of features.

One of the biggest mistakes you can make in migrating existing SQL Server
databases is to assume that after the upgrade your code will run and produce
results exactly as before. This is a good time to review existing databases and
their code, as well as data access code in client applications, to clean it up and
accommodate changes introduced in SQL Server 2005.

TIP: If you are connecting to SQL Server using the .NET Framework Data
Provider for SQL Server (SqlClient), you can set the Type System Version
keywords in the connection string to one of three possible values:

Type System Version=SQL Server 2000;


Type System Version=SQL Server 2005;
Type System Version=Latest;

When you set this value to SQL Server 2000, the SQL Server 2000 type
system is used, which affects data type conversions. For more information,
see the documentation in the .NET Framework Help for
SqlConnection.ConnectionString.

Fortunately, Microsoft provides an Upgrade Advisor tool you can use to find
and highlight many of the issues you’ll face when upgrading.

Upgrade Advisor
The SQL Server 2005 Upgrade Advisor tool helps you prepare for upgrading
existing instances of earlier versions of SQL Server. It analyzes those instances
and its installed components and produces a report on the issues that you
should address before upgrading to SQL Server 2005.

Microsoft SQL Server 2005 2-11


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

WARNING! In our experience, the Upgrade Advisor does a good job of


identifying the issues you should address. But it is a mechanical tool
that isn’t very smart about unusual situations. You’ll still need to do
your own work to review your databases and to thoroughly test your
applications after upgrading.

Upgrade Advisor is available on the SQL Server 2005 distribution files and
CDs, as a separate installation from SQL Server 2005. In most of the
distributions we’ve seen, it is located in the \SQL Server
x86\Servers\redist\Upgrade Advisor directory. It requires prior installation
of version 2.0 of the .NET Framework, which is available in the \SQL Server
x86\Servers\redist\2.0 directory.

TIP: The opening screen of the Upgrade Advisor has a link to check for program
updates. Be sure to check; Microsoft seems to update the program often as it
finds new upgrade issues.

Once you install the Advisor, running it is straightforward. Start it from the
Windows Start menu in All Programs|Microsoft SQL Server 2005. The
program consists of an analysis wizard and a report viewer, both of which you
can start from the opening screen.

The wizard steps you through the process of selecting the server instance and
the components to analyze, the connection to the instance, and the databases
you want to check, then launches the analysis.

2-12 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Upgrading an Earlier Version

The wizard does a deep analysis, which can take a fair amount of time
depending on the options you selected and the number and size of the
databases it analyzes. It keeps you updated on its progress with the Upgrade
Advisor Progress window shown in Figure 1. If any messages appear in the
Message column, click the link for the full message.

Figure 1. The Upgrade Advisor Analysis Wizard progress window as it nears


completion.

Microsoft SQL Server 2005 2-13


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

When the wizard finishes, the Stop button shown in Figure 1 changes to
Launch Report. Click this button to open the Upgrade Advisor Report
Viewer, shown in Figure 2. The viewer provides plenty of information about
the problems it found; you can filter the list based on the SQL Server service
analyzed and type of issue.

Figure 2. The Upgrade Advisor Report Viewer.

You can dramatically improve the chances that your upgrade to SQL Server
2005 will go smoothly if you take the time to run the Advisor and fix the
issues it finds.

TIP: The analysis wizard analyzes only; it doesn’t make any changes to the
databases or the server. So you can run it, fix things, and run it again, then
repeat as you fix any problems it finds.

2-14 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installation Steps

Installation Steps
SQL Server 2005 is a complex set of server software and tools, and it offers an
almost infinite variety of options for setup and configuration. Nevertheless, it
is surprisingly easy to install because the setup wizard steps you through
everything, from checking for and installing prerequisites through performing
the install and updating you on its progress.

In this section, you’ll learn about a typical install and introduce many of the
available options. In the next section, you’ll see how to change some of these
options after installation, as well as many of the configuration options that the
setup tool does not expose.

TIP: All of this may seem pretty intimidating the first time you set up a SQL
Server instance. There are a lot of options, many of which will be confusing
the first time you encounter them. But rest assured that in most cases you can
alter the configuration after you finish installing SQL Server. And even
better, most of the default settings will work for most installations. You’ll
have to make a few decisions along the way even if you go with all the
defaults, but this section should guide you through those.

The subsections that follow describe the steps to install a named instance of
SQL Server using the Developer Edition. Installation of other editions and the
default instance should be much the same, except SQL Express. Other editions
you install may have a few other options that are particular to that version. If
you are upgrading an earlier version of SQL Server, expect a few additional
options as well.

TIP: SQL Express is a desktop version of SQL Server that can be installed as part
of an application. Express is not covered in this course.

WARNING! You must be logged in as a member of the local administrators group


on the machine where you are installing SQL Server.

Microsoft SQL Server 2005 2-15


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Installing Prerequisites
After you start the SQL Server setup program, a license appears and you must
agree to the license terms before proceeding. Once you do that, the setup
program checks your system for various prerequisites, including:

• Microsoft .NET Framework Version 2.0


• Microsoft SQL Server Native Client
• Microsoft SQL Server 2005 Setup Support Files
The actual list varies with the edition of SQL Server you install and the version
of Windows. Figure 3 shows the Installing Prerequisites box while it is
installing various options. For the machine on which this is running, which
already has a default instance of SQL Server 2005 installed, it only had to
install some support files.

Figure 3. Installing prerequisites for SQL Server 2005.

2-16 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installation Steps

TIP: If you cancel installation after the prerequisites are installed, the prerequisites
will not be uninstalled. You can, however, uninstall them one at a time using
the Add/Remove Programs Control Panel applet in Windows.

System Configuration Checks


After the system prerequisites are installed, the Microsoft SQL Server
Installation Wizard starts automatically and goes into the System
Configuration Check. This checks the configuration of the machine, mostly to
determine whether it has various system components installed and if they are
at the minimum required version.

If the configuration check finds any problems, the dialog box shown in Figure
4 will contain information about the problem. If it is in the form of a warning,
you can safely proceed with installation, but certain features that depend on the
item may not be installed or usable. If any items are classified as errors, you’ll
need to exit the installation, correct the problem, and restart setup. You can use
the Filter button to view various subsets of the list; use the Report button to
view the detailed report, copy it to the Clipboard, save it to a file, or send it as
an e-mail.

Figure 4. The System Configuration Check.

Microsoft SQL Server 2005 2-17


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

If the check is successful, with nothing worse than a warning, the Next button
launches the actual SQL Server installation program, which includes many
options!

Customizing the Installation


Next is a series of screens that enable you to customize the instance of SQL
Server.

Registration Information
The first page gathers information about you to “personalize your installation,”
as shown in Figure 5. Only your name is required (some types of product
distributions also require a product key that you received with purchase). Feel
free to enter whatever information you like; it doesn’t affect the installation
other than cosmetically. One of us is fond of entering “Everyone Everywhere”
in dialog boxes like this, but we rather strongly suspect it doesn’t affect our
rights under the SQL Server license.

Figure 5. Registration information.

2-18 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installation Steps

Components to Install
The next step is the Components to Install page, shown in Figure 6 with a
couple of options selected. Here you can select which of the major SQL Server
components you want to install. These selections determine the next sequence
of steps in the installation, since most of these options require more
information from you in order to customize that component’s installation.

Figure 6. Select the components you want to install.

If you want to fine-tune the components you install, click the Advanced button
to display the Feature Selection dialog box shown in Figure 7. The initial
settings here are set based on your current selections in the Components to
Install dialog box in Figure 6. You also change the directory where the SQL
Server program files reside, as well as calculate the disk space requirement.

Microsoft SQL Server 2005 2-19


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Figure 7. Select the program features you want to install.

You can drill down into each of the major components and select or deselect
various features. You might want to consider changing a few features, which
you can do by clicking the down arrow in the icon to the left of each item. In
the Database Services section:

• Replication is a specialized way of keeping two databases, usually on


different machines, in sync. If you won’t use this feature, select to
make the feature unavailable.
• Full-Text Search provides power text search capabilities that go
beyond SQL, based on an index that SQL Server maintains. This
feature requires programming. If you won’t implement it, make it
unavailable.
• All of the Client Components are appropriate for installation on a
development server but should not be installed on a production server.
Make this entire feature unavailable on production servers.
• The features under Documentation, Samples, and Sample Databases
are also inappropriate for production servers, but are quite helpful on
development machines. Only SQL Server Books Online is selected by
default, but to help you learn SQL Server, it is advisable to install all
of these features.

2-20 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installation Steps

TIP: You can always run the installation tool again to install or uninstall any
features that you initially chose incorrectly. You can’t change everything, but
you can easily rectify mistakes for most features.

Instance Name
The next page is Instance Name, shown in Figure 8. Here you elect to install
either a default or a named instance. If you’re not sure what instances are
already installed, if any, click the Installed instances button to see a list and
some basic information about each. In the case shown in Figure 8, we are
installing a named instance called AppDev.

Figure 8. The Instance Name page.

Microsoft SQL Server 2005 2-21


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

TIP: It might seem odd to you that even though a default instance of SQL Server is
already installed on the machine used in this chapter, the Default Instance
radio button is enabled. This occurs because if you rerun the installation
program to change options, you can select an existing default instance—or
any existing named instance, for that matter—to change its options.

Service Account
The next step in the wizard is to configure the Service Account. All of the core
features of SQL Server run as services, which don’t require a user to be logged
into an interactive Windows session. But all Windows programs, even
services, have to use some form of Windows credentials. This is the page
where you specify the service account for each service you install. You can
specify a different account for each service or the same account for all
services.

As discussed elsewhere in this chapter, usually on a production server you’ll


want to create a domain user account with the least privileges necessary to run
each service. This is one part of providing the most secure installation
possible, since any attacker who gains control of SQL Server won’t be able to
do much outside of SQL Server.

In this case, however, because we’re installing this instance of SQL Server on
a development machine, we’ll use the built-in Local System account for
convenience; those settings are shown in Figure 9. When the database and
application are deployed to a production server, we’ll use a more secure
option.

2-22 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installation Steps

Figure 9. The Service Account page.

The Service Account page also allows you to choose the main SQL Server
services that should start automatically at the end of installation. Usually you
can leave the default set to SQL Server only. You can customize these after
installation using the SQL Server Configuration Manager, discussed later in
this chapter.

Authentication Mode
The next step is to select the Authentication Mode, shown in Figure 10. You
can set up SQL Server to authenticate users with Windows authentication or a
combination of Windows and SQL Server authentication. Windows
authentication is generally more secure, and that’s what we’ll select here.

Microsoft SQL Server 2005 2-23


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Figure 10. Selecting the authentication mode.

If you select Mixed Mode, you’ll need to specify a password for the built-in sa
administrative user. Make this a strong password—a long one with a mix of
letters, numbers, and punctuation symbols. This is an all-powerful login, and
you’ll want to protect that password very carefully.

Collation Settings
The Collation Settings page, shown in Figure 11, allows you to change the
default setting to match the collation of another instance of SQL Server or the
Windows locale of another computer. SQL collations are necessary if you
want to align your data with data stored on an older version of SQL Server.

2-24 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installation Steps

Figure 11. Specifying collation settings.

A collation comprises the rules that govern the use of characters for a language
or an alphabet (many languages share an alphabet). A collation determines
how text is sorted and compared. Binary collation gives the best performance
but it is case-sensitive. Many developers prefer case-insensitive collation to
allow more flexibility in comparing text that may have been entered with
varying case. Unless you know exactly what you’re doing, it is generally best
to stick with the default collation setting. Changing collation after you install
requires you to rebuild all database objects.

Error and Usage Report Settings


Microsoft has become a lot more aggressive about improving the quality of its
products, particularly its server software. The Error and Usage Report Settings
page shown in Figure 12 lets you customize whether you want to allow SQL
Server to send error reports or feature usage data back to Microsoft. Microsoft
uses the information to improve SQL Server. All the information is
confidential and is sent over a secure SSL connection. You can also configure
it to send the reports to your own corporate error reporting server. SQL Server
Books Online provides details about the information it sends, when it is sent,
and how to configure the features.

Microsoft SQL Server 2005 2-25


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Figure 12. Error and usage report settings.

If you change your mind about these settings after installation, you can run the
SQL Server Error and Usage Reporting tool from the Windows Start menu
under Microsoft SQL Server 2005, Configuration Tools.

TIP: We rarely enable these features on a production server, particularly if it is


heavily used. While we appreciate how useful the aggregate information from
many servers can be to improving SQL Server, we just don’t want to devote
resources to it. Let your own faith in Microsoft and willingness to contribute
to the common good be your guide.

2-26 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installation Steps

Performing the Installation


Once you’ve made all the decisions about features to install and various
options, the setup wizard presents you with a Ready to Install dialog box (see
Figure 13) that briefly summarizes what is about to happen. It doesn’t provide
a huge amount of detail, but gives you one last chance to address any nagging
doubts about your selections and backtrack to make changes.

Figure 13. Your setup is ready to install.

Microsoft SQL Server 2005 2-27


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Next, after setting up the configuration changes, the setup program makes
changes to the system and copies and installs files. It does a great job of
updating you on its progress via the Setup Progress box shown in Figure 14.
For a clean, first-time install of SQL Server 2005 on a machine, this part can
take quite a while. So go grab a cup of your favorite caffeine source, and watch
your progress toward an incredible database server.

Figure 14. The Setup Progress shows which components are installing.

2-28 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installation Steps

Once everything is done, you’ll get a final report of what happened, shown in
Figure 15. You can check out a summary log that has a bit of detail and run a
configuration tool from this page. The text box at the bottom has some
information about what to do next for various features. Unfortunately, this list
is not fully customized for the selections you made.

Figure 15. Wrap-up of the SQL Sever 2005 installation.

When you’re done contemplating this information, click the Finish button to
end the setup. You now have a SQL Server 2005 instance ready and waiting.

TIP: Unattended and remote setups are not supported in the initial release of SQL
Server 2005. We expect that Microsoft will eventually add them in a service
release.

Microsoft SQL Server 2005 2-29


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Configuring the Server


SQL Server 2005 includes many options for configuring the server after
installation. This section covers the two configuration tools as well as the use
of Management Studio to configure the server and databases.

SQL Server Configuration Manager


Even though it seems like a tightly integrated set of software components, SQL
Server actually consists of a dizzying array of Windows services, standalone
tools, network protocols, and other components. You might expect to use
several tools to set every option. The SQL Server Configuration Manager
brings many of these options together, letting you manage various aspects of
the outward face of SQL Server and its interaction with its exterior
environment.

Start the tool from the Windows Start menu by selecting it from Microsoft
SQL Server 2005|Configuration Tools. The tree view on the left side of the
window lists the three groups of options. The first, SQL Server 2005 Services,
shown in Figure 16, lets you configure the services used by various
components as well as see the current status of each. The right-click pop-up
menu lets you start and stop the service, as well as set various properties such
as the service account.

Figure 16. Using the SQL Server Configuration Manager to manage SQL Server
2005 services.

The second part of the tool helps you configure the network protocols that
SQL Server supports, shown in Figure 17. These are the protocols that SQL
Server “listens” to for client connections, so you’ll want to enable protocols
that clients will use and disable those they won’t. When you expand this
section of the tree view, it lists each of the instances installed on the server. For
each instance, the display shows whether each protocol is enabled, and the

2-30 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Configuring the Server

right-click pop-up menu lets you change its status and set properties. Each
properties page sets properties specific to the selected protocol.

Figure 17. Using SQL Server Configuration Manager to configure network


protocols.

The last section of the tool configures client connections to other SQL
Servers—how it will make outbound database connections. The first set of
options for client protocols, shown in Figure 18, determines which network
protocols to use and the order in which a client will attempt to use them. For
example, Figure 18 shows the defaults for installation of a new instance so that
shared memory is tried first, followed by TCP/IP, and lastly, named pipes. The
VIA protocol is disabled in this instance of SQL Server.

Figure 18. Configuring the client protocols using the SQL Server Configuration
Manager.

The other part of SQL Native Client Configuration lets you define aliases. An
alias is an alternate name for a SQL Server to which a client needs to connect.
The alias lets you use a name other than the server name, as well as store the
protocol used to connect to the server, the server name, and custom

Microsoft SQL Server 2005 2-31


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

information appropriate for the selected protocol. For example, in Figure 19 a


client application could use the name MyServer to connect to a database on a
machine called Riverchaser using TCP/IP and the default port.

Figure 19. Defining an alias for a SQL Server.

SQL Server Surface Area Configuration


Tool
From a security point of view, many of SQL Server 2005’s plentiful features
are installed in a disabled state. For example, CLR integration, database
mirroring, debugging, Service Broker, and mail functions are installed but are
not running and not available until you explicitly turn them on. This design is
consistent with the off by default philosophy of SQL Server and leads to a
reduced attack surface. An attack surface refers to areas where an attacker can
gain a toehold on the server. The fewer features you install, the fewer places an
attacker can probe for weaknesses.

2-32 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Configuring the Server

Although disabling features until they’re needed is great for security, it can be
difficult to research how to turn a feature on when you need it, and sometimes
you need to write nonintuitive code to turn it on. So SQL Server includes the
SQL Server Surface Area Configuration Tool, a handy GUI for configuring the
server. You’ll probably want to run it right after you install SQL Server, if you
know the features you’ll be using.

Start the Surface Area Configuration tool from the Windows Start menu by
selecting All Programs|Microsoft SQL Server 2005|Configuration Tools|
SQL Server Surface Area Configuration. The tool opens with a brief
description of itself, a link to its documentation, and one link to configure
services and protocols, and another to configure other features.

The configuration tool for services and protocols, shown in Figure 20, displays
all of the installed services for all local instances of SQL Server, enabling you
to start, stop, and modify SQL Server services. There is some overlap with the
SQL Server Configuration Manager, but this tool focuses on security issues.

Figure 20. Services and protocols configuration options in the Surface Area
Configuration tool.

The other configuration option from the startup window, shown in Figure 21,
lets you turn on or off various optional features for the server and set various
options. Most features listed have a single check box with which you turn the

Microsoft SQL Server 2005 2-33


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

feature on or off. But some features, if they are installed, have additional
options you can configure.

Figure 21. Feature configuration options in the Surface Area Configuration tool.

WARNING! Microsoft has made the features of SQL Server 2005 as secure as
possible. Nevertheless, you should never enable any feature that you
don’t use. Any unnecessary feature can open potential attack paths to
your server. For example, if you don’t plan to write any .NET
Common Language Runtime (CLR) code that will be hosted in the
server, don’t enable that feature. Otherwise you might find one day
that a rogue developer has installed dangerous CLR code.

2-34 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Configuring the Server

Server Configuration
Management Studio provides plenty of options to configure a SQL Server
instance after installation. To open the Server Properties dialog box, right-click
the server name in Object Explorer and select Properties, as shown in
Figure 22.

Figure 22. Configuring a server by right-clicking the server name in Object


Explorer.

Microsoft SQL Server 2005 2-35


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

The Server Properties dialog box, shown in Figure 23 for a server named
Riverchaser, has eight pages that are selectable from a list on the left side of
the form, as well as information about the current connection and the status of
any actions that are in progress.

Figure 23. Main window of the Server Properties dialog box.

2-36 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Configuring the Server

You can click the View connection properties link to get more information
about the connection that Management Studio uses to access the server. This
displays the Connection Properties dialog box shown in Figure 24. All of the
information is read-only, since you can’t change a connection while it is live.

Figure 24. The Connection Properties dialog box.

The Connection Properties dialog box also includes buttons at the top of the
form for getting help and for scripting any changes you make. The scripting
option sends the Transact-SQL code to make any changes to a new query
window in Management Studio, to a file, to the Windows Clipboard, or to a
SQL Agent job to be run later.

Microsoft SQL Server 2005 2-37


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

For example, if you change the default index fill factor on the Database
Settings page to 10% and use the Script button to open the code in a new query
window, it generates this code:

EXEC sys.sp_configure N'show advanced options', N'1'


RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'fill factor (%)', N'10'
GO
RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'show advanced options', N'0'
RECONFIGURE WITH OVERRIDE
GO

This is a great way to see how Management Studio manipulates the server
using Transact-SQL and system-stored procedures behind the pretty graphical
user interface (GUI).

In the following sections, you’ll explore the most important and interesting
information you can view and options you can set using the Server Properties
dialog box.

TIP: Anything and everything you can do in the GUI tools in SQL Server 2005,
you can do in Transact-SQL, the primary programming language of SQL
Server, and Server Management Objects (SMO), a programming object
model for SQL Server. The GUI tools simply write and run the underlying
code for you. So if you prefer typing out commands, or want to build your
own SQL Server tools, you can do so by using the same infrastructure
Microsoft used to build the tools. You’ll learn about these features in various
parts of the course.

2-38 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Configuring the Server

General Settings
The General Settings page of Server Properties, shown in Figure 25, doesn’t
have any settings you can change. Instead, it displays a lot of information
about the server and its environment. Of most interest are the product (in this
case the Developer Edition of SQL Server 2005), the operating system it is
running on, and the version of SQL Server. The actual information presented
here varies a little, depending on the edition of SQL Server and the service
pack.

Figure 25. General Settings page of Server Properties.

Microsoft SQL Server 2005 2-39


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

TIP: Windows doesn’t return what you might expect regarding the version. For
example, the SQL Server instance shown in Figure 25 is running on Windows
XP Professional, but Windows returns “Microsoft Windows NT 5.1 (2600).”
Windows Server 2003 returns “Microsoft Windows NT 5.2 (3790).” So if
you’re going to rely on this information, be sure to translate this into the
actual name of Windows.

Note too the warning at the bottom of the General Settings page. Microsoft
Product Support Services has probably spent a lot of time helping people undo
the work of power users who go in and tweak settings without knowing their
full effect!

2-40 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Configuring the Server

Memory Options
The Memory Options page of Server Properties, shown in Figure 26, provides
a few options for how SQL Server uses and manages memory. Like most
server settings, the default settings will probably be fine for most servers that
aren’t under extreme load.

Figure 26. Memory Options page of Server Properties.

The first check box determines whether SQL Server will use Address
Windowing Extensions (AWE) in 32-bit versions of Microsoft Windows 2000
and Windows Server 2003 to support up to 64 gigabytes of physical memory.
This requires configuring settings in Windows as well, but lets you take
advantage of huge amounts of memory for your database server.

The minimum and maximum memory settings control how much memory
SQL Server uses on this machine. The only time you should consider changing
the defaults is when the machine will have other server applications on it, such

Microsoft SQL Server 2005 2-41


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

as Microsoft Exchange, in which case SQL Server can’t grab every byte of
memory for its own use. If the other server applications request memory only
as they need it, don’t worry about changing this setting. SQL Server will
release memory to those applications as necessary.

TIP: The default maximum value of 2147483647 doesn’t directly relate to the
amount of memory in the machine. It is simply the maximum setting and
essentially means to use all available memory.

The other memory options, for index creation and queries, control how much
memory is allocated for those operations. These can affect performance and
SQL Server is optimized to perform them as efficiently as possible. If you
monitor performance of a live server and see excessive memory operations,
you might consider tweaking these values.

NOTE A few of the Server Properties pages have two radio buttons at the
bottom, Configured Values and Running Values. Some changes
you can make on these pages require stopping and restarting the
SQL Server service for the change to take effect. You can select
Running Values to see the value for each option and whether it
reflects the new value. If it doesn’t, stop and restart SQL Server to
make the change take effect.

2-42 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Configuring the Server

Server Processors
SQL Server 2005 supports multiple processors if they are available on the
server. The Server Processors page, shown in Figure 27 on a single-processor
machine, lets you control how SQL Server uses multiple processors.

Figure 27. The Server Processors page of Server Properties.

The list of processors lets you specify which processors to use for this instance
of SQL Server. You can change the Processor Affinity to dedicate one or more
processors to SQL Server and reduce some of the overhead of moving threads
between processors. This change can help the database server’s performance
but may hinder Windows’ performance. I/O Affinity binds disk input/output
operations to one or more processors. Using this option essentially binds I/O
threads to the specified processors.

On multiprocessor machines, the check boxes below the list of processors save
you time by letting you change the options for all processors.

The lower part of the page lets you control threading. You can set the
maximum worker threads, which helps limit the resources consumed on
servers with hundreds of client connections, since normally a new Windows
thread is created for each connection. Setting a maximum can hurt
performance because once the limit is reached, any new connection attempts
must wait for another connection to close before accessing the server.

Microsoft SQL Server 2005 2-43


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

You can also boost the priority of SQL Server threads. This can result in more
processor time relative to other processes on the server, but can actually hurt
performance if essential Windows functions are unable to run efficiently.

Keep in mind that changing processor options reduces SQL Server’s ability to
manage its own resources. You should consider doing so only when you have
a situation that SQL Server does not seem to be handling appropriately.

Security Options
Security is Job 1 in SQL Server 2005, and the Security options page in Server
Properties let you configure a few settings, shown in Figure 28. Probably the
most important setting on this page is the server authentication mode, either
Windows authentication alone or mixed mode; both SQL Server and Windows
authentication are available.

Figure 28. Security Options in Server Properties.

The login auditing options control which authentication operations are logged
in the Windows event logs. The default is Failed logins only, which is a great
tool to alert you to some types of attacks, such as a dictionary attack on user
names and passwords. The more you log, however, the greater the effect on
performance.

2-44 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Configuring the Server

You can set up a proxy account for use when calling the xp_cmdshell extended
stored procedure, which runs code in a Windows command shell. Code that
runs in the command shell has the permissions of the specified user. Make sure
that whatever account you specify here has the least privileges necessary for
the tasks you’ll perform in the command shell. Otherwise, an attacker who
gains control of SQL Server can run high-level operations from the command
shell.

The C2 audit tracing option configures the server to record attempts to access
Transact-SQL statements and database objects. This saves a huge amount of
information, so you’ll need to monitor the disk files to make sure that you
don’t run out of disk space, which can cause SQL Server to shut itself down to
prevent attacks. The cross-database chaining option can enable ownership
chaining across SQL Server instances. This is a potential security hole, so you
should have a good reason to enable this option.

Client Connections
The options on the Connections page, shown in Figure 29, let you control how
applications connect to the server and set the default properties of connections
from client applications, including the tools in SQL Server. The maximum
number of concurrent connections limits the absolute numbers of client
connections. This can limit server resources that service those connections, but
can also leave clients waiting for a connection.

Figure 29. The Connections page of Server Properties.

Microsoft SQL Server 2005 2-45


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Sometimes rogue code can get into an infinite loop and continue to hog
resources until they are used up and SQL Server or Windows shuts down. The
query governor option can limit the execution time of any query. You can
specify a time in seconds that SQL Server will allow a query to run before
shutting it down and rolling back the transaction. The default is 300 seconds.
Be careful not to set this too low, since it may cause client applications to
receive error messages when a query can’t run to completion.

The list in the middle of the page lets you set the default connection options. If
a client connects with a connection string that doesn’t specify any of these
values, the value will be set to what you specify here. Most of the defaults are
acceptable for most servers, and all are fairly advanced options that can affect
how you write code that accesses the server.

To maintain maximum security, the SQL Server instance by default doesn’t


allow remote connections. That is, it doesn’t allow client connections from any
machine other than the one on which this instance is running. This is actually a
great security option in situations where the databases support only local
applications, such as a Web server running on the same machine. But if client
applications on other machines will have to connect to this server, you’ll need
to enable them here. You can also set the default connection timeout if none is
specified in the connection string.

Database Settings
The Database Settings page, shown in Figure 30, lets you set properties for
both existing and new databases. The default index fill factor specifies the
amount of empty space SQL Server leaves in new and rebuilt indexes. In
general, the amount, specified as a percentage, should be low for databases in
which the data doesn’t change much and high when data is constantly added
and deleted. This allows the index to accommodate the changed data without
requiring SQL Server to move entries around. The default setting of zero lets
SQL Server optimize the fill factor for you.

2-46 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Configuring the Server

Figure 30. Database Settings page of Server Properties.

The Backup and restore area lets you configure backup options. The
Recovery interval is the time that SQL Server takes to recover a database
when it starts up. During recovery, SQL Server rolls back transactions that did
not commit and rolls forward transactions that did commit but whose changes
were not yet written to disk when SQL Server stopped. The default of zero
means that this is set automatically.

The Database default locations area allows you to specify a default file
location for new databases. This setting won’t have any effect on existing
databases.

Advanced Settings
The Advanced page, shown in Figure 31, lists a variety of rarely used but
important settings. More specifically, you should probably review, but not
change, these settings for a new installation of SQL Server.

Microsoft SQL Server 2005 2-47


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Figure 31. The Advanced settings page of Server Properties.

Most of these are truly advanced, but there are a few you might consider
changing:

• Allow Triggers to Fire Others. A database trigger is code that runs


when data changes in a table. Although it is sometimes useful, by
allowing a trigger to fire another, you can easily get into an infinite
loop that can hog processing time.
• Default Language and Default Full-Text Language. These specify
the language used in SQL Server by default and the syntactic
characteristics of searches in data.
• Two Digit Year Cutoff. This setting was more of a concern during the
Y2K scare at the end of the last millennium, but is still applicable. If
dates with only two-digit years are stored in the server, by default if
the value is less than 49 the year is assumed to be between 2000 and
2049. If greater than 49, it is assumed to be in the second half of the
20th century, from 1950 to 1999.

2-48 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Configuring the Server

Permissions
The Permissions page, shown in Figure 32, displays a list of principals and
explicitly granted permissions that each has at the server level. But briefly, a
principal is a user or code process that you can grant permissions to access
various database and server objects. This allows you to define and control
access to the server to protect the data stored therein. Changing permission
here for a principal affects the access that the principal has to the server. In
other words, it changes what the principal can see and do in SQL Server.

Figure 32. Permissions settings in Server Properties.

Microsoft SQL Server 2005 2-49


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Summary
• Successfully installing SQL Server 2005 requires careful preparation
and planning, with care that prerequisites are met.
• Most installations should run the SQL Server service using a custom
domain user account, but other account options are available.
• You can install multiple instances of SQL Server 2005 on a server, and
the default instance can be SQL Server version 6.5 or later.
• SQL Server 2005 installation can upgrade recent versions of SQL
Server, but it must be a compatible edition.
• The Upgrade Advisor is invaluable in finding and avoiding upgrade
issues.
• The System Configuration Checks portion of the installation ensures
that required prerequisites are installed.
• The SQL Server 2005 installation program takes you step by step
through setting up the server. There are many options, but most can be
changed after installation.
• Microsoft included features in SQL Server 2005 that automatically
upload information about errors and usage patterns, which you can
enable or disable during installation or later.
• The SQL Server Configuration Manager helps set up SQL Server’s
interaction with the outside world, including client connections and
protocols.
• The SQL Server Surface Area Configuration Tool has options to
reduce the attack surface of your server.
• Management Studio includes various dialog boxes you can use to
configure a SQL Server instance.
• Everything you can do using SQL Server’s GUI tools, you can do
using Transact-SQL and system stored procedures.

2-50 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Configuring the Server

Questions
1. What is probably the best service account to use for an instance of SQL
Server that resides on the same machine as the Web server?

2. If you install both SQL Server 7.0 and SQL Server 2005 on the same
computer, which one must be the default instance?

3. True/False: Microsoft guarantees that all code in a database on an


updateable version of SQL Server will continue to run without
modification.

4. True/False: You must always provide a strong password for the special sa
login.

5. Which SQL Server tool can you use to start, stop, and configure the
Windows services that SQL Server uses?

Microsoft SQL Server 2005 2-51


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.
Installing SQL Server 2005

Answers
1. What is probably the best service account to use for an instance of SQL
Server that resides on the same machine as the Web server?
Most likely the local service account, if it doesn't have to access
the network.

2. If you install both SQL Server 7.0 and SQL Server 2005 on the same
computer, which one must be the default instance?
SQL Server 7.0

3. True/False: Microsoft guarantees that all code in a database on an


updateable version of SQL Server will continue to run without
modification.
False. Many features are no longer available, some are
deprecated, and some are likely to produce different results.

4. True/False: You must always provide a strong password for the special sa
login.
False. If you select Windows Authentication mode, no sa
password is necessary. This is one of the methods that makes
this mode more secure.

5. Which SQL Server tool can you use to start, stop, and configure the
Windows services that SQL Server uses?
SQL Server Configuration Manager or the SQL Server Surface
Area Configuration Tool. Configuration Manager has more options
for configuring the services, however.

2-52 Microsoft SQL Server 2005


Copyright © by Application Developers Training Company
All rights reserved. Reproduction is strictly prohibited.

You might also like