Tải bản đầy đủ (.pdf) (10 trang)

Microsoft SQL Server 2008 R2 Unleashed- P28 ppsx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (515.36 KB, 10 trang )

ptg
224
CHAPTER 8 Installing SQL Server 2008
4. Now things get a bit tricky. Because Slipstream support is introduced with SP1, the
setup.exe program that shipped with the original SQL Server 2008 installation
media doesn’t support the /PCUSource or /CUSource options that allow you to speci-
fy the locations of the service pack and cumulative updates to be slipstreamed.
Instead, you need to run the SQL Server 2008 Setup program for Service Pack 1 and
specify the action as INSTALL, and the file paths for the original media, as well as ser-
vice pack and cumulative update files. These are specified using the /ACTION,
/MEDIASource, /PCUSource, and /CUSource parameters. The following example shows
how to run a slipstream install of SQL Server 2008 from the install CD in the D:
drive with SP1 extracted to the C:\SQLServer2008SP1 folder:
C:\SQLServer2008SP1>setup.exe /PCUSource=C:\SQLServer2008SP1 /ACTION=INSTALL
/MEDIASOURCE=D:\
This command runs the SQL Server installation in the normal GUI mode, requiring
you to specify and confirm all settings. If you want, you can also choose to run the
install in a limited interface or automated mode, as described previously in this
chapter in the section describing how to use a configuration file. However, the first
time you run a Slipstream installation, you should at least use an interface that
allows you to view the Ready to Install page before running the installation so that
you can verify whether the desired Slipstream installation is being performed. If the
setup utility is running a Slipstream installation, it is indicated in the Action field, as
shown in Figure 8.28.
FIGURE 8.28 Verifying a Slipstream installation on the Ready to Install page.
Download from www.wowebook.com
ptg
225
Summary
8
Summary


This chapter provides a fairly detailed overview of the SQL Server 2008 install process
from start to finish. The chapter shows how the new Installer Wizard makes it easy to
install as many instances as you like, with whatever feature sets and in whatever configu-
ration you choose.
The chapter also shows how the installer reports progress, failure, and success on an indi-
vidual task basis rather than with one seemingly endless progress bar, making it a lot
easier to rectify problems without calling Microsoft or scouring the newsgroups to figure
out what went wrong.
Chapter 9, “Upgrading to SQL Server 2008,” takes a similar approach to examining the
process of upgrading from SQL Server 2000 or SQL Server 2005 to SQL Server 2008 or SQL
Server 2008 R2.
Download from www.wowebook.com
ptg
This page intentionally left blank
Download from www.wowebook.com
ptg
CHAPTER 9
Upgrading to SQL
Server 2008
IN THIS CHAPTER
. What’s New in Upgrading SQL
Server
. Using the SQL Server Upgrade
Advisor (UA)
. Destination: SQL Server 2008
or SQL Server 2008 R2
. Upgrading Using a
Configuration File
. Slipstreaming Upgrades74
. Upgrading Other SQL Server

Components
SQL Server 2008 offers a number of new features and
improvements that make upgrading desirable. You can
upgrade instances of SQL Server 2000 and SQL Server 2005
to SQL Server 2008 or SQL Server 2008 R2, as well as
upgrade SQL Server 2008 to SQL Server 2008 R2. Whether
you’re a gung-ho developer or the most conservative of
administrators, there’s an upgrade path to suit your comfort
level. This chapter provides best practices and recommenda-
tions for upgrading to SQL Server 2008 with minimal issues.
What’s New in Upgrading SQL
Server
SQL Server 2008 provides a new installer program for
performing installations and upgrades. The new features of
the SQL Server 2008 Installer include
. A new SQL Server 2008 Installation Center landing
page, which includes a number of options for plan-
ning, installing, and maintaining a SQL Server imple-
mentation; links to SQL Server documentation for
planning and reviewing before starting the upgrade;
and a link to install the Upgrade Advisor.
. The Feature Upgrade Wizard, which allows DBAs to
upgrade or change the installed edition of SQL Server
2008 or SQL Server 2008 R2 (for example, upgrading
from Standard Edition to Enterprise Edition without
having to perform a complete reinstall).
Download from www.wowebook.com
ptg
228
CHAPTER 9 Upgrading to SQL Server 2008

. A discovery report that provides a detailed information regarding all SQL Server
components, features, and settings associated with an install or upgrade.
. The potential to automate SQL Server upgrades by using a configuration file.
. A tool that allows for a smooth transition of SQL Server Integration Services (SSIS)
packages by automatically upgrading them from SQL Server 2005 to the SQL Server
2008 Integration Services format.
Also new in SQL Server 2008 is a refined Upgrade Advisor. The Upgrade Advisor tool
allows a DBA to fully analyze existing SQL Server 2005 and SQL Server 2000 installations
for issues that may surface when upgrading to SQL Server 2008 or SQL Server 2008 R2.
Addressing these issues before conducting the upgrade should lead to a smoother experi-
ence when transitioning to SQL Server 2008.
With the release of Service Pack 1, SQL Server 2008 also now supports Slipstream installa-
tions. Slipstreaming is a method of integrating a SQL Server 2008 update (such as a
service pack or cumulative update) with the original installation media so that the origi-
nal media and update are installed at the same time. This can be a huge timesaver over
having to manually apply service packs or cumulative updates after performing a full
installation or upgrade.
NOTE
The focus of this chapter is on upgrade options and best practices rather than a
screen-by-screen walkthrough of the upgrade process. An upgrade installation is not
much different from a new installation. See Chapter 8, “Installing SQL Server 2008,”
for a detailed walkthrough and description of the installer screens and options.
Using the SQL Server Upgrade Advisor (UA)
It would be a daunting task indeed to try to test every stored procedure and function,
every table and view, every online analytical processing (OLAP) cube, every Data
Transformation Services (DTS) or SQL Server Integration Services (SSIS) package, and so on
that your team has built to make sure they still work after you migrate them to SQL
Server 2008.
With the availability of the SQL Server Upgrade Advisor (UA), you can relax a bit and let
the combined experience and testing of early adopters and the SQL Server development

team go to work for you.
NOTE
Even though the UA is a great tool, if you have the resources to do so, it is a good idea
to set up an additional test environment just for SQL Server 2008. Also, you should
thoroughly test your upgraded objects and code after the upgrade on a dry run, just to
be sure you don’t miss anything. Remember to make full backups!
Download from www.wowebook.com
ptg
229
Using the SQL Server Upgrade Advisor
FIGURE 9.1 Installing the Upgrade Advisor from the SQL Server 2008 Installer.
The UA advises on which aspects of your current setup should or need to be changed to
become compatible with SQL Server 2008. Let’s look at how it works.
Getting Started with the UA
Before running the Upgrade Advisor, you must first install it. The easiest way to install the
Upgrade Advisor is to start the SQL Server 2008 Installer. On the Installer Landing page is
an option to install the Upgrade Advisor (see Figure 9.1). Alternatively, the Upgrade
Advisor is available in the Servers\redist\Upgrade Advisor folder of the SQL Server
installation media, or from the Microsoft Download Center. The Upgrade Advisor has the
following system requirements:
. Windows XP Service Pack 2 (SP2) or later, Windows Vista, Windows Server 2003 SP2
or later, or Windows Server 2008 SP2, Windows 7, and Windows Server 2008 R2.
. Windows Installer beginning with version 4.5 (required by the .NET Framework; you
can install Windows Installer from the Windows Installer website)
. The .NET Framework
9
NOTE
If not installed already, the .NET Framework 2.0 is available on the SQL Server 2008
product media, and from the SDK, redistributable, and service pack download website.
To install the .NET Framewor k 2.0 from the SQL Ser ver 2008 media, locate the root of

the disk drive. Then double-click the \redist folder, double-click the \2.0 folder, and
run Dotnetfx.exe (for 32-bit) or Dotnetfx64.exe (for 64-bit), depending on your oper-
ating system.
Download from www.wowebook.com
ptg
230
If you run the SQL Server Installer, it installs the Windows Installer and .NET Framework
requirements automatically if they are not detected.
If upgrading from SQL Server 2000 Analysis Services, you need to install the SQL Server
2000 Decision Support Objects (DSOs) on the system where UA will be run to scan
upgrade issues in Analysis Services. To install DSOs, run the SQL Server 2000 Setup
program and click Install SQL Server 2000 Components. Click Analysis Services to start the
Analysis Services Setup program. In Select Components, make sure that the Decision
Support Objects component is selected.
Additionally, if you are upgrading SQL Server 2000 DTS packages, the SQL Server 2000
client components are required to scan SQL Server 2000 DTS packages. The SQL Server
2000 client components can be installed from the SQL Server 2000 installation disk.
If you are upgrading from SQL Server 2005 DTS packages that were migrated from SQL
Server 2000, you need to install the SQL Server 2005 backward-compatibility components
to scan SQL Server 2005 DTS. Use the SQL Server 2005 installation disk to install back-
ward-compatibility components.
NOTE
The location where you can install SQL Server Upgrade Advisor depends on what you
will be analyzing. Upgrade Advisor supports remote analysis of all supported compo-
nents except Reporting Services. If you are not scanning instances of Reporting
Services, you can install Upgrade Advisor on any computer that can connect to your
instance of SQL Server and that meets the Upgrade Advisor prerequisites. If you are
scanning instances of Reporting Services, you must install Upgrade Advisor on the
Report Server.
As described in the following sections, the UA has two main functional areas: the Analysis

Wizard and Report Viewer. The first time you use Upgrade Advisor, run the Upgrade
Advisor Analysis Wizard to analyze SQL Server components. When the wizard finishes the
analysis, you can view the resulting reports in the Upgrade Advisor Report Viewer.
The Analysis Wizard
You’ll be glad to know that the analysis process does not modify any code or data; that is
left for you to do (or not do) at a later time. As an example, let’s run the UA’s Analysis
Wizard against all the SQL Server components of a locally installed SQL Server 2005
instance. The Analysis Wizard examines objects that can be accessed, such as scripts,
stored procedures, triggers, and trace files. Upgrade Advisor cannot analyze desktop appli-
cations or encrypted stored procedures.
To start the process, click the Launch Upgrade Advisor Analysis Wizard hyperlink at the
bottom of the Welcome page (see Figure 9.2). When the Analysis Wizard’s Welcome page
appears, click Next. When you reach the SQL Server Components screen, choose all the
components to be analyzed by checking their corresponding check boxes (see Figure 9.3).
CHAPTER 9 Upgrading to SQL Server 2008
Download from www.wowebook.com
ptg
231
FIGURE 9.2 The Upgrade Advisor Welcome page.
Using the SQL Server Upgrade Advisor
9
FIGURE 9.3 Choosing the components to be analyzed by the UA’s Analysis Wizard.
Download from www.wowebook.com
ptg
232
FIGURE 9.4 Choosing the databases and files for the UA to analyze.
NOTE
Be sure to select only components that are actually installed on the server being
upgraded; otherwise, the Upgrade Advisor stalls at the appropriate feature screen with
an error message that the feature could not be found on the specified server.

When the Connection Parameters screen appears, choose the target server, select an authen-
tication method, and if using SQL Server authentication, enter your username and password
so that the UA can connect to your instance. Click Next, and the SQL Server Parameters
screen, shown in Figure 9.4, appears. Choose which (if any) databases to analyze.
CHAPTER 9 Upgrading to SQL Server 2008
You can also use this screen to ask the UA to analyze one or more SQL Profiler trace (.trc)
files. This feature is useful for analyzing the T-SQL statements submitted from one or more
applications for deprecated or discontinued features. You would want to set up and run a
trace in SQL Profiler ahead of time to capture a representative sample of the T-SQL
executed against the server. You can also scan T-SQL batch files (maintenance scripts,
procedures, functions, triggers, and so on) to check for deprecated or discontinued features
used in the SQL scripts.
For this example, create a SQL batch file that contains the following T-SQL commands,
most of which are deprecated in SQL Server 2008, just to test the UA:
use bigpubs2008
go
EXEC sp_configure ‘set working set size’
Download from www.wowebook.com
ptg
233
Using the SQL Server Upgrade Advisor
9
SELECT * FROM master syslockinfo
DECLARE @ptr varbinary(16)
SELECT @ptr = TEXTPTR(pr_info)
FROM pub_info
WHERE pub_id = ‘6380’
SELECT *
FROM Stores s, Stores s2
WHERE s.Stor_Id *= s2.Stor_Id

AND s.Stor_name <> s2.Stor_name
READTEXT pub_info.pr_info @ptr 0 25
When you’re ready, click Next, and the Upgrade Advisor presents screens for each of the
SQL Server components you selected previously (refer to Figure 9.3) asking for login infor-
mation or to select packages to analyze. Note that if you selected a component, but that
component isn’t installed on the server you are upgrading, the Upgrade Advisor reports
that no instances of that component could be found on the server and you cannot
proceed until you go back and deselect the component.
If you selected to analyze DTS or SSIS packages, the DTS and SSIS Parameters screens (shown
in Figure 9.5) give you the option to analyze all the packages stored in the target instance or
to specify one or more package files to be analyzed.
FIGURE 9.5 Choosing the DTS and SSIS packages to analyze.
Download from www.wowebook.com

×