ptg 244 CHAPTER 9 Upgrading to SQL Server 2008 FIGURE 9.13 Running the Upgrade Wizard from the Installation Center. FIGURE 9.14 The Select Instance screen in the SQL Server Installation Center. Download from www.wowebook.com ptg 245 Destination: SQL Server 2008 or SQL Server 2008 R2 9 full-text catalog, a new filegroup is still created on the same disk to maintain the pre- upgrade disk I/O behavior. If the old full-text catalog path is invalid, though, the upgrade places the full-text index in the same filegroup as the base table or in the primary file- group if the table is partitioned. Three options are available for upgrading your existing full-text catalogs: . Import—Typically, import is the fastest method of upgrading, but an imported full- text catalog does not use the new and enhanced word breakers introduced in SQL Server 2008, so you might want to rebuild your full-text catalogs eventually if not during the upgrade. . Rebuild—This method uses the new SQL Server 2008 word breakers, but rebuilding indexes can take awhile. . Reset—When you use this method, SQL Server 2005 full-text catalog files are removed, but the metadata for full-text catalogs and full-text indexes is retained. The catalog remains empty until you manually issue a full population after the upgrade completes. After choosing your full-text upgrade option, you next choose your Error Reporting options, and then the Upgrade Rules check is run to validate your system configuration with the options and features chosen during the upgrade process. If all the rules pass, you can review the upgrade operation on the Ready to Upgrade page, which also displays the path to the upgrade configuration file (this is useful for setting up and performing unat- tended upgrades from the command line, as discussed later in this chapter). If everything looks okay, click Upgrade to begin the upgrade process. The upgrade process automatically upgrades all objects that are common to all databases, including the following: . Tables, views, indexes, and constraints . Stored procedures, functions, and triggers . User-defined types, rules, and defaults . Logins, users, and permissions . Database diagrams You can monitor the upgrade progress on the Upgrade Progress screen. Depending on your hardware configuration and the features to be upgraded, the upgrade operation can take from approximately 30 minutes to several hours. The databases on the instance being upgraded remain unavailable until the upgrade is complete. When the upgrade finishes, it displays the upgrade status of each component and also provides the location of the upgrade log. A system restart may be required in some cases if any upgraded components were in use during the upgrade process. Download from www.wowebook.com ptg 246 CHAPTER 9 Upgrading to SQL Server 2008 When your upgrade of the Database Engine is complete, it is recommended that you perform the following on all databases (also recommended for side-by-side migration): . Repopulate your full-text catalogs if you chose not to rebuild them during the upgrade. . Run the sp_updatestats system stored procedure to update statistics. . Reregister your server in SSMS. The SQL Server 2008 Upgrade Matrix No software upgrade section would be complete without an illustrative table showing the versions and editions of SQL Server for which the upgrade methods described thus far are supported. They are presented in Table 9.1. TABLE 9.1 Supported Upgrade Paths to SQL Server 2008 and 2008 R2 Previous SQL Server Edition Supported Upgraded Edition SQL Server 2000 Enterprise Edition SP4 SQL Server 2008 Enterprise Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2008 R2 Datacenter Edition SQL Server 2000 IA64 Enterprise Edition SP4 SQL Server 2008 IA64 Enterprise Edition SQL Server 2008 R2 IA64 Enterprise Edition SQL Server 2008 R2 IA64 Datacenter Edition SQL Server 2000 Developer Edition SP4 SQL Server 2008 Developer Edition SQL Server 2008 R2 Developer Edition SQL Server 2000 IA64 Developer Edition SP4 SQL Server 2008 IA64 Developer Edition SQL Server 2008 IA64 R2 Developer Edition SQL Server 2000 Standard Edition SP4 SQL Server 2008 Standard Edition SQL Server 2008 Enterprise Edition SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2000 Workgroup Edition SP4 SQL Server 2008 Workgroup Edition SQL Server 2008 Standard Edition SQL Server 2008 Enterprise Edition SQL Server 2008 R2 Workgroup Edition SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2000 Personal Edition SP4 Not supported SQL Server 2000 Evaluation Edition Not supported Download from www.wowebook.com ptg 247 Destination: SQL Server 2008 or SQL Server 2008 R2 9 TABLE 9.1 Supported Upgrade Paths to SQL Server 2008 and 2008 R2 Previous SQL Server Edition Supported Upgraded Edition SQL Server 2000 MSDE 2000 SP4 SQL Server 2008 Express SQL Server 2008 Express with Tools SQL Server 2008 Express with Advanced Services SQL Server 2008 Workgroup SQL Server 2008 R2 Express SQL Server 2008 R2 Express with Tools SQL Server 2008 R2 Express with Advanced Services SQL Server 2008 R2 Workgroup SQL Server 2005 Enterprise Edition SP2 SQL Server 2008 Enterprise Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2008 R2 Datacenter Edition SQL Server 2005 IA64 Enterprise Edition SP2 SQL Server 2008 IA64 Enterprise Edition SQL Server 2008 R2 IA64 Enterprise Edition SQL Server 2008 R2 IA64 Datacenter Edition SQL Server 2005 X64 Enterprise Edition SP2 SQL Server 2008 X64 Enterprise Edition SQL Server 2008 R2 X64 Enterprise Edition SQL Server 2008 R2 X64 Datacenter Edition SQL Server 2005 Developer Edition SP2 SQL Server 2008 Developer Edition SQL Server 2008 R2 Developer Edition SQL Server 2005 IA64 Developer Edition SP2 SQL Server 2008 IA64 Developer Edition SQL Server 2008 IA64 R2 Developer Edition SQL Server 2005 X64 Developer Edition SP2 SQL Server 2008 X64 Developer Edition SQL Server 2008 X64 R2 Developer Edition SQL Server 2005 Standard Edition SP2 SQL Server 2008 Standard Edition SQL Server 2008 Enterprise Edition SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2005 IA64 Standard Edition SP2 SQL Server 2008 IA64 Enterprise Edition SQL Server 2008 R2 IA64 Enterprise Edition SQL Server 2005 X64 Standard Edition SP2 SQL Server 2008 X64 Standard Edition SQL Server 2008 R2 X64Standard Edition SQL Server 2008 X64 Enterprise Edition SQL Server 2008 R2 X64 Enterprise Edition Download from www.wowebook.com ptg 248 CHAPTER 9 Upgrading to SQL Server 2008 TABLE 9.1 Supported Upgrade Paths to SQL Server 2008 and 2008 R2 Previous SQL Server Edition Supported Upgraded Edition SQL Server 2005 Workgroup Edition SP2 SQL Server 2008 Workgroup Edition SQL Server 2008 Standard Edition SQL Server 2008 Enterprise Edition SQL Server 2008 R2 Workgroup Edition SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2005 Personal Edition SP2 Not supported SQL Server 2005 Evaluation Edition Not supported SQL Server 2005 Express SP2 SQL Server 2008 Express SQL Server 2008 Express with Tools SQL Server 2008 Express with Advanced Services SQL Server 2008 Workgroup SQL Server 2008 Standard Edition SQL Server 2008 Enterprise Edition SQL Server 2008 R2 Express SQL Server 2008 R2 Express with Tools SQL Server 2008 R2 Express with Advanced Services SQL Server 2008 R2 Workgroup SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2005 Express SP2 Advanced SQL Server 2008 Express with Advanced Services SQL Server 2008 Workgroup SQL Server 2008 Standard Edition SQL Server 2008 Enterprise Edition SQL Server 2008 R2 Express with Advanced Services SQL Server 2008 R2 Workgroup SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2008 Enterprise Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2008 R2 Datacenter Edition SQL Server 2008 IA64 Enterprise Edition SQL Server 2008 R2 IA64 Enterprise Edition SQL Server 2008 R2 IA64 Datacenter Edition SQL Server 2008 X64 Enterprise Edition SQL Server 2008 R2 X64 Enterprise Edition SQL Server 2008 R2 X64 Datacenter Edition Download from www.wowebook.com ptg 249 Destination: SQL Server 2008 or SQL Server 2008 R2 9 TABLE 9.1 Supported Upgrade Paths to SQL Server 2008 and 2008 R2 Previous SQL Server Edition Supported Upgraded Edition SQL Server 2008 Developer Edition SQL Server 2008 R2 Developer Edition SQL Server 2008 R2 Datacenter Edition SQL Server 2008 IA64 Developer Edition SQL Server 2008 R2 IA64 Developer Edition SQL Server 2008 R2 IA64 Datacenter Edition SQL Server 2008 X64 Developer Edition SQL Server 2008 R2 X64 Developer Edition SQL Server 2008 R2 X64 Datacenter Edition SQL Server 2008 Standard Edition SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2008 R2 Datacenter Edition SQL Server 2008 X64 Standard Edition SQL Server 2008 R2 X64Standard Edition SQL Server 2008 R2 X64 Enterprise Edition SQL Server 2008 R2 X64 Datacenter Edition SQL Server 2008 Workgroup Edition SQL Server 2008 R2 Workgroup Edition SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2008 R2 Datacenter Edition SQL Server 2008 X64 Workgroup Edition SQL Server 2008 R2 X64 Workgroup Edition SQL Server 2008 R2 X64 Standard Edition SQL Server 2008 R2 X64 Enterprise Edition SQL Server 2008 R2 X64 Datacenter Edition SQL Server 2008 Web Edition SQL Server 2008 R2 Web Edition SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2008 X64 Web Edition SQL Server 2008 R2 X64 Web Edition SQL Server 2008 R2 X64 Standard Edition SQL Server 2008 R2 X64 Enterprise Edition SQL Server 2008 Express SQL Server 2008 R2 Express SQL Server 2008 R2 Express with Tools SQL Server 2008 R2 Express with Advanced Services SQL Server 2008 R2 Workgroup SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2008 R2 Datacenter Edition Download from www.wowebook.com ptg 250 CHAPTER 9 Upgrading to SQL Server 2008 NOTE As you see in Table 9.1, direct upgrades from versions prior to SQL Server 2000 SP4 or SQL Server 2005 versions prior to SP2 are not supported. Options for migrating databases from these versions of SQL Server are presented later in this chapter. Upgrading Using a Configuration File If you need to upgrade multiple SQL Server 2008 instances, you’ll likely want to do so without having to run the Installation Center utility each time and manually select the same options over and over. Fortunately, you can run an upgrade via the Installation Center using a configuration file. Using a configuration file, you have a couple options for how you run the upgrade: using the Upgrade Wizard with options prefilled by the config- uration file or as a fully automated and unattended installation from the command line. If you run using the GUI with the options prefilled by the configuration file, you have the opportunity to review and change options along the way as necessary. NOTE If you’ve never run a SQL Server installation using the setup feature of SQL Server, you should refer to the “Installing SQL Server Using a Configuration File” section in Chapter 8 for a detailed description of the process and options available. TABLE 9.1 Supported Upgrade Paths to SQL Server 2008 and 2008 R2 Previous SQL Server Edition Supported Upgraded Edition SQL Server 2008 Express Advanced SQL Server 2008 R2 Express with Advanced Services SQL Server 2008 R2 Workgroup SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2008 R2 Datacenter Edition SQL Server 2008 Evaluation Edition Not supported Download from www.wowebook.com ptg 251 Slipstreaming Upgrades 9 Following are a few of the parameters relevant to running an upgrade using a configura- tion file: . /ACTION=UPGRADE—Specifies that you are running an upgrade. . /INSTANCENAME—Specifies the SQL Server instance to be upgraded. For the default instance, you use the special value MSSQLSERVER. . /CONFIGURATIONFILE—Specifies the configuration file to use for the upgrade. . /INSTANCEDIR—Specifies a nondefault installation directory for shared compo- nents to be upgraded. . /UIMODE—Specifies whether to present only the minimum number of dialog boxes during setup. Normal presents all setup dialogs; AutoAdvance skips nonessential dialog boxes. . /FTUPGRADEOPTION—Specifies the full-text catalog upgrade option. Valid values are REBUILD, RESET, and IMPORT. To create an upgrade configuration file, run the Upgrade Wizard as described previously and follow it all the way through to the Ready to Install page where the location of the generated Configuration.ini file is specified. At this point, you can click the Cancel button if you don’t want to actually perform the upgrade. Then copy the Configuration.ini file to another location so you can make any necessary edits to it. To run an upgrade using a configuration file, you need to run the setup.exe program, which can be found at the root level of the installation media. If you want to override any of the values in the configuration file or provide values not specified in the configuration file, you can provide additional command-line parameters. For example, to avoid having to enter the service account passwords during the installation, you can enter them on the command line using the password parameters to config.exe. Following is a sample execu- tion to upgrade the default instance and specify the account and password for Reporting Services and the service account for Integration Services: Setup.exe /q /ACTION=upgrade /INSTANCENAME=MSSQLSERVER /RSUPGRADEDATABASEACCOUNT=”myRSaccount” /RSUPGRADEPASSWORD=”myRSpassword” /ISSVCAccount=”NT Authority\Network Service” /IACCEPTSQLSERVERLICENSETERMS Note also that the preceding example specifies the /q parameter, which runs the upgrade in Full Quiet mode, which is intended for running unattended installations. With this switch provided, Setup runs without any user interface. Another option is to run with the /QS switch, which shows progress via the GUI but does not accept any input and displays no error messages if encountered. Slipstreaming Upgrades If you are upgrading to SQL Server 2008, you’ll likely want to install Service Pack 1 as well and possibly the latest cumulative update. In the past, this meant running the upgrade and then running the Service Pack 1 (SP1) install and cumulative update separately. This Download from www.wowebook.com ptg 252 CHAPTER 9 Upgrading to SQL Server 2008 process can be tedious and time consuming. Fortunately with the release of SP1, SQL Server 2008 supports Slipstream installations and upgrades. As mentioned previously, slip- streaming is a method of integrating a SQL Server 2008 update with the original installa- tion media so that the original media and the update are installed at the same time. Because slipstreaming was introduced with SQL Server 2008 SP1 and not with the initial release, a slipstream upgrade must be run from the setup.exe program provided with SQL Server 2008 SP1. If you run from the SP1 media folder, you need to specify the location of the SQL Server 2008 installation media using the MEDIASOURCE parameter, as shown in the following example: setup.exe /PCUSource=C:\SQLServer2008SP1 /ACTION=UPGRADE /MEDIASOURCE=D:\ /INSTANCENAME=MSSQLSERVER The /PCUSource parameter is used to specify the location of the SP1 package. You use the /CUSource parameter to specify the location of a Cumulative Update package you want to apply as well, if any. NOTE A slipstream install cannot be used to update a SQL Server 2008 instance to SQL Server 2008 R2. For a full description and more detailed examples on how to set up and run a Slipstream installation, refer to Chapter 8. Upgrading from SQL Server 7 or SQL Server 6.5 SQL Server supports upgrading from SQL Server 2000 SP4 and later and SQL Server 2005 SP2 and later. Unfortunately, upgrading directly from SQL Server 7.0 or earlier versions is not supported. The supported migration path is to first migrate your SQL Server 7.0 (or earlier) databases to SQL Server 2000 SP4 or 2005 SP2 (upgrades that are supported) and then upgrade from one of these versions to SQL Server 2008 or 2008 R2. If you have a SQL Server 2000 SP2 or SQL Server 2005 SP4 instance available, the easiest way to upgrade your SQL Server 7.0 or earlier databases is to detach them from the source server and then attach the databases to an instance running either SQL Server 2000 SP2 or SQL Server 2005 SP4. When the database is attached, it is upgraded to that version, and then you can upgrade the database to SQL Server 2008 R2. Generally, this is the preferred method. Another option is to use the SQL Server Import and Export Wizard to copy data from a 7.0 or earlier instance of SQL Server. The main disadvantage of this approach is that it brings over only tables and data. You have to manually script your stored procedures, functions, triggers, views, and other database objects and re-create them on the upgraded target database. Download from www.wowebook.com ptg 253 Upgrading Other SQL Server Components 9 Upgrading Other SQL Server Components Now that you’ve seen how to migrate databases, jobs, logins, custom error messages, and full-text catalogs, let’s discuss how you can migrate the rest of your SQL Server objects. First, let’s look at Analysis Services. Upgrading Analysis Services The following sections highlight some important considerations you should be aware of when upgrading Analysis Services. Upgrading from SQL Server 2005 Analysis Services You can upgrade an existing instance of SQL Server 2005 Analysis Ser vices to SQL Server 2008 Analysis Services using the Upgrade Wizard. The wizard automatically migrates exist- ing databases from the old instance to the new instance. The metadata and binary data is compatible between the SQL Server 2005 and SQL Server 2008, so the data is retained after you upgrade. You do not have to manually migrate the data. To upgrade an existing instance of SQL Server 2005 Analysis Services, run the Upgrade Wizard and specify the name of the existing AS instance as the name of the new AS instance. The AS databases are upgraded automatically. NOTE Users running in a 64-bit environment must upgrade Analysis Services before upgrading the SQL Server Database Engine. You can, of course, run setup more than once, so in this situation it is recommended that you upgrade Analysis Services first (separately) and then upgrade your other components on subsequent runs. Upgrading from SQL Server 2000 Analysis Services Because of changes to the underlying architecture of Analysis Services between SQL Server 2000 and SQL Server 2008, you cannot perform an in-place upgrade. You have to migrate your SQL Server 2000 AS databases to SQL Server 2008. The first task is to install a new named instance of SQL Server 2008 Analysis Services (SSAS) by using the SQL Server 2008 Installation Center program. When this process is complete, you can use the Analysis Services Migration Wizard to import your SQL Server 2000 Analysis Services content into the SQL Server 2008 AS format. This wizard re-creates your existing OLAP structures on the new instance, without altering the original source material. If you remove the prior instance of SQL Server 2000 Analysis Services after you have migrated its databases, you can use the Analysis Services Instance Rename tool to make the named instance of SQL Server 2008 Analysis Services the default instance on the server. To launch the Analysis Services Migration Wizard, open the Object Browser and connect to Analysis Services. Then navigate to the top-level Analysis Services node to find the wizard. You can also simply select Start, Run and then enter the command MigrationWizard.exe. You need to make sure that MSSQLServerOLAPService is running before you begin; you can verify this by using the SQL Server Service Manager. Download from www.wowebook.com . Edition SQL Server 2008 R2 X64 Web Edition SQL Server 2008 R2 X64 Standard Edition SQL Server 2008 R2 X64 Enterprise Edition SQL Server 2008 Express SQL Server 2008 R2 Express SQL Server 2008 R2. SQL Server 2008 R2 X64 Datacenter Edition SQL Server 2008 Web Edition SQL Server 2008 R2 Web Edition SQL Server 2008 R2 Standard Edition SQL Server 2008 R2 Enterprise Edition SQL Server 2008. SQL Server 2008 Enterprise Edition SQL Server 2008 R2 Express SQL Server 2008 R2 Express with Tools SQL Server 2008 R2 Express with Advanced Services SQL Server 2008 R2 Workgroup SQL Server