CH 02
CH 02
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.
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.
The operating system requirements for SQL Server 2005 are listed in Table 2.
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.
TIP: Internet Explorer does not have to be the default browser on the target
machine.
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.
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:
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:
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.
MyComputer\MyInstance
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.
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.
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:
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.
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:
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:
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.
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.
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.
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.
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.
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.
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:
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.
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.
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!
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.
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.
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.
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:
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
right-click pop-up menu lets you change its status and set properties. Each
properties page sets properties specific to the selected protocol.
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
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
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.
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.
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.
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.
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.
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:
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.
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.
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!
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
Most of these are truly advanced, but there are a few you might consider
changing:
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.
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.
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?
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?
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
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.