03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 39

SQL Server 2005 CHAPTER 3 Setup and IN THIS CHAPTER Deployment • SQL Server 2005 Editions

• Hardware and Software Requirements for Installing SQL Server 2005

Setup and deployment are integral to a product, • SQL Server 2005 Setup and they are two of the important factors that deter- Enhancements mine the user experience and customer satisfaction. Setup is the “first date” with the product; as you will • Upgrading to SQL see in this chapter, has gone to great Server 2005 lengths to make SQL Server 2005 setup as “roman- tic” as possible. A successful installation and the ease of deployment add value to the product and increase the overall customer satisfaction. Responding to the feedback received from customers and SQL Server product support services profession- als, Microsoft has done a lot of work to make SQL Server 2005 setup more robust and user friendly, to reduce the instances of setup failures, to better handle error conditions, and to help users deploy multiple features or components from the SQL Server 2005 family. In this chapter, you’ll learn about the various editions of SQL Server 2005, hardware and software requirements for SQL Server 2005, new setup and deployment experience and features, deprecated and discontinued features, breaking and behavior changes to the database engine, and upgrading from previous releases. Let’s begin by looking at various SQL Server 2005 editions.

SQL Server 2005 Editions One of the tasks in planning a SQL Server deploy- ment is choosing the right combination of SQL 03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 40

40 CHAPTER 3 SQL Server 2005 Setup and Deployment

Server editions, based on your application’s scalability, availability, performance, and advanced analysis requirements. You can choose from the following SQL Server 2005 editions: • Enterprise Edition—This edition includes the complete set of SQL Server data management and analysis features and is uniquely characterized by several features that make it the most scalable and available edition of SQL Server 2005. This edition has no limit on the number of processors or amount of memory or database size. It includes all the performance, scalability, high-availability, security, manageability, programmability, integration and interoperability, and business intelligence features, making it a comprehensive data and analysis platform for large, mission-critical business applications. • Standard Edition—This edition is a complete data and analysis platform, and it is designed for medium-sized businesses. It places no limit on the amount of memory or the database size, but the number of processors is limited to four. Standard Edition includes high-availability features such as database mirroring and failover clustering, but it does not support online indexing or online page or file restores. Some of the business intelligence features, such as proactive caching and text mining, are turned off in Standard Edition. Standard Edition does not support parti- tioning or parallel index operations. • Workgroup Edition—In February 2005, Microsoft announced a new addition to both the SQL Server 2000 and SQL Server 2005 families, called Workgroup Edition. Workgroup Edition is an affordable, easy-to-use, and simple-to-manage database solution designed specifically for small to medium-sized organizations. SQL Server 2005 Workgroup Edition places no limit on the size of the database. However, it is limited to two processors and 3GB of RAM. (SQL Server 2000 Workgroup Edition limits the amount of RAM to 2GB.) Workgroup Edition does not support high- availability features such as database mirroring, clustering, and online indexing, and it lacks most of the other editions’ business intelligence features. • Express Edition—SQL Server 2005 Express Edition supersedes Microsoft SQL Server 2000 Desktop Engine (MSDE). Like MSDE 2000, SQL Server 2005 Express Edition is a no-cost, freely redistributable version. Unlike MSDE 2000, which does not provide any graphical tools, SQL Server 2005 Express Edition provides graphical tools such as Express Manager and SQL Server Configuration Manager. Unlike MSDE 2000, SQL Server 2005 Express Edition does not implement a “concurrent workload throttle” mechanism to limit the application’s scalability under heavy load. Express Edition limits the database size to 4GB, a single processor, and up to 1GB of server memory. Express Edition does not support many features, such as database mirroring, failover, partitioning, and online index operations, and it does not bundle tools such as SQL Server Management Studio and Profiler. • Mobile Edition—Microsoft SQL Server 2000 Windows CE 2.0, also known as SQL Server CE, is being superseded by SQL Server 2005 Mobile Edition. This edition can run on table PCs and smart devices, including any device that runs Microsoft 03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 41

Hardware and Software Requirements for Installing SQL Server 2005 41

Windows CE 5.0, Microsoft Mobile Pocket PC 2003, Microsoft Mobile Version 5.0 Pocket PC, or Microsoft Mobile Version 5.0 Smart Phone. SQL Server 2005 Mobile Edition includes a set of relational database features while maintaining a compact footprint. This edition contains several significant advancements over SQL Server CE. • Evaluation Edition—This time-limited trial version, which contains the same features as Enterprise Edition, is available only for testing and evaluation purposes and should not be deployed in production. • Developer Edition—This edition contains the same features as Enterprise Edition, but it is intended only for development purposes and should not be deployed in production.

As you can see, SQL Server 2005 provides the flexibility to acquire the right combination of SQL Server technologies to meet your needs. Once you know which SQL Server editions you need, the next step is to figure out the hardware and software requirements for installing each edition.

Hardware and Software Requirements for Installing SQL Server 2005 SQL Server 2005 can run on 32-bit platforms as well as on 64-bit platforms based on Itanium or x64 64-bit architectures. The hardware and software requirements on the 32- bit platform are different than the requirements for the 64-bit platform. Different editions of SQL Server 2005 have different hardware and software requirements. In addition, different SQL Server 2005 components, such as Reporting Services, have additional requirements. SQL Server 2005 setup includes a startup process called System Configuration Checker (SCC) that checks whether the system meets the minimum hard- ware and software requirements, in addition to performing other configuration checks. (Note that SCC warns the user but does not block the setup if the processor speed or the available system memory does not meet the requirement. SCC is discussed later in this chapter.) The following sections list the hardware and software requirements of SQL Server 2005 Enterprise Edition on 32-bit and 64-bit platforms. You can find complete details on SQL Server 2005 requirements at www.microsoft.com/sql and in Books Online.

SQL Server 2005 Enterprise Edition 32-Bit Requirements SQL Server 2005 Enterprise Edition 32-bit has the following hardware requirements: • Pentium III–compatible processor or higher • 500MHz or faster processor • 512MB of RAM • 42MB of hard disk space, up to approximately 735MB of hard disk space 03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 42

42 CHAPTER 3 SQL Server 2005 Setup and Deployment

SQL Server 2005 Enterprise Edition 32-bit has the following operating system require- ments: • Windows 2000 Advanced or Datacenter Edition with Service Pack 4 or higher • Windows 2003 Enterprise or Datacenter Edition or Windows Small Business Server 2003 Service Pack 1 Standard or Premium Edition • x64 systems running Windows 2003 Service Pack 64-bit X64 Standard, Enterprise, or Datacenter Edition • SQL Server 2005 32-bit will run in Windows on Windows (WOW64) mode on x64 platform

SQL Server setup, which is run by Microsoft 3.0, has the following soft- ware requirements: • SQL Server setup installs Microsoft Windows .NET Framework 2.0 and Microsoft SQL Server Native Client, which are required by the product. • Microsoft Internet Explorer 6.0 Service Pack 1 or later is required for all installations of SQL Server 2005. However, if you are installing client components only and you will not connect to a server that requires encryption, Internet Explorer 4.01 with Service Pack 2 is sufficient.

NOTE SQL Server Express Edition does not install .NET Framework 2.0. Before installing Express Edition, you must download and install.NET Framework 2.0 from the Microsoft website.

• SQL Server 2005 Reporting Services requires Internet Information Services (IIS) 5.0 or higher. The IIS web server must be in the running state if you want SQL Server 2005 setup to configure the Report Server. • For systems running Windows 2000, Reporting Services has a dependency on MDAC 2.8. SQLXML depends on MDAC 2.6 for systems running Windows 2000. • Notification Services has a dependency on SQLXML, so MDAC 2.6 or higher is required to run Notification Services on Windows 2000.

SQL Server 2005 Enterprise Edition 64-Bit Requirements SQL Server 2005 Enterprise Edition 64-bit has the following hardware requirements: • Itanium processor (IA64) or higher or x64 processors such as AMD Opteron, AMD Athlon 64, Intel Xenon with Intel EM64T support, or Intel Pentium IV with EM64T support 03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 43

SQL Server 2005 Setup Enhancements 43

• 733MHz or faster Itanium processor or1GHz or faster x64 processor • 512MB of RAM

SQL Server 2005 Enterprise Edition 64-bit has the following operating system require- ments: • On the IA64 platform, Windows 2003 Service Pack 1 64-bit Itanium Enterprise or Datacenter Edition • On the x64 platform, Windows 2003 Service Pack 1 64-bit x64 Standard, Enterprise, or Datacenter Edition

SQL Server 2005 Setup Enhancements Let’s now explore some of the enhancements introduced in SQL Server 2005 setup. SQL Server 2005 setup has been redesigned and re-architected from scratch to provide a flexi- ble, unified, easy-to-use, robust, and secure setup experience. The following are some of the new setup features: • Windows Installer–based setup—Instead of using proprietary InstallShield-based setup, SQL Server 2005 now uses the latest Windows Installer (MSI) technology, which provides the most reliable, secure, customizable, and self-healing installation experience. • Enhanced user experience—Microsoft has invested a lot of time and resources in simplifying the installation process and at the same time giving complete control over the installation to the users. Microsoft has done a lot of work to improve the setup usability and user experience. It has redesigned all the setup dialogs, and beta customers and usability engineers have evaluated them several times. Also, Microsoft has improved the setup documentation to serve as a better setup reference and a troubleshooting guide. • System Configuration Checker (SCC)—The SCC routines scan the destination computer for conditions that may block setup. In other words, SCC checks for conditions that would prevent a successful SQL Server installation. Before setup starts the SQL Server 2005 Installation Wizard, the SCC retrieves the status of each check item, compares the result with required conditions, and provides guidance for removal of any blocking issues. SCC checks can run on a local computer, as well as in remote and cluster situations. For clusters, SCC runs on all nodes of the virtual server. As shown in Figure 3.1, SCC checks include operating system minimum level requirements, minimum hardware requirements, any pending reboot requirement, any system administrator privilege requirement, any WMI service requirement, any MSXML requirement, and so on. 03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 44

44 CHAPTER 3 SQL Server 2005 Setup and Deployment

FIGURE 3.1 SCC verifies whether the system meets the minimum requirements and also performs other checks to increase the chances of a successful setup.

• Integrated setup experience—SQL Server 2005 setup provides a single feature tree for installation of one or more SQL Server 2005 components, including the database engine, Analysis Services, Reporting Services, Notification Services, Integration Services, replication, management tools, documentation, and samples. Figure 3.2 shows the feature selection tree that provides a unified way to selectively install various SQL Server 2005 components. For each selected component, you can specify a disk folder that the component should be installed in to.

FIGURE 3.2 SQL Server 2005 setup provides a single feature tree to install one or more SQL Server components. 03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 45

SQL Server 2005 Setup Enhancements 45

• Improved logging and error handling—As discussed previously, SCC minimizes the setup failure instances. However, if a setup still fails, then the improved detailed logging and error-handling mechanism introduced with SQL Server 2005 setup helps you quickly troubleshoot and resolve the setup issue. A setup summary file is generated at %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Summary.txt, and detailed log files are generated in the %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files folder.

TIP Microsoft provides a tool called Wilogutl.exe that you can use to analyze the log files generated by a Windows Installer–based installation, such as SQL Server 2005 setup. You can find more information about this tool at http://msdn.microsoft.com/library/ en-us/msi/setup/wilogutl_exe.asp.

Figure 3.3 shows the Setup Progress dialog. When the setup for a component is finished, the text under the Status column becomes a link that can be clicked to open the setup log file for that component.

FIGURE 3.3 The Setup Progress dialog box lists each component as it is being installed and configured.

• Cluster setup enhancements—SQL Server 2005 setup has been enhanced to better support the installation and configuration of failover clustering. The setup estab- lishes real-time communication between the host computer and secondary nodes during the installation. This facilitates integrated logging, progress reporting, and achieving consistent installation states across all cluster nodes to make the installa- tion more reliable and robust. In addition, unlike in previous releases, SQL Server 2005 setup now provides an ability to selectively install components such as 03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 46

46 CHAPTER 3 SQL Server 2005 Setup and Deployment

Full-Text Search and Analysis Services. SQL Server 2005 clustered installations can be scripted for unattended installation.

SQL Server 2005 includes configuration tools such as Surface Area Configuration, Reporting Services Configuration, SQL Server Error and Usage Reporting, and SQL Server Configuration Manager that let you alter some of the settings originally configured using SQL Server setup.

Upgrading to SQL Server 2005 SQL Server 2005 allows you to upgrade from SQL Server 7.0 Service Pack 4 and SQL Server 2000 Service Pack 3 and above. Direct upgrade from SQL Server 6.5 is not supported; you need to first upgrade from SQL Server 6.5 to SQL Server 7.0 Service Pack 4 and then use the SQL Server 2005 setup to upgrade to SQL Server 2005. Upgrading requires careful planning and execution. You have to consider upgrading your data, Data Transformation Services (DTS) packages, agent jobs, logins, replication setup, failover clustering setup, Analysis Services objects, Full-Text Search objects, Reporting Services configuration, Notification Services configuration, and so on. To help you with the upgrade process, SQL Server 2005 provides a tool called Upgrade Advisor that analyzes the system and installed SQL Server 2000 or SQL Server 7.0 components and then gener- ates a report that identifies issues you must or should address before or after upgrading to SQL Server 2005. SQL Server 2005 setup has been enhanced to simplify the upgrade process and to reduce the server downtime during the upgrade. Before upgrading the database engine, you need to make sure to do the following: • Review hardware and software requirements for installing SQL Server 2005. • Review SQL Server 2005 backward compatibility notes and make appropriate changes to your application and scripts. • Run the Upgrade Advisor tool to prepare for upgrades and resolve any upgrade blocking issues. • Back up all SQL Server database files from the instance to be upgraded, so you can completely restore them, if necessary. • Run the appropriate DBCC commands on databases to be upgraded to ensure that they are in a consistent state.

• Ensure that existing SQL Server system databases—master, model, msdb, and tempdb—are configured with the autogrow setting and ensure that they have adequate hard disk space. • Disable all startup stored procedures because the upgrade process will stop and start services on the SQL Server instance being upgraded. Stored procedures processed at startup time may block the upgrade process. • Stop replication and make sure that the replication log is empty. 03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 47

Upgrading to SQL Server 2005 47

After you have gone through this pre-upgrade checklist, you can run the setup and install an instance of SQL Server 2005. When SQL Server 2005 is installed, you can move user databases to a SQL Server 2005 instance by using the backup and restore or the detach and attach functionalities in SQL Server 2005. You can then register your server, repopu- late any full-text catalogs, update the statistics, and run the Surface Area Configuration tool to reduce the attackable surface. Before we look at Upgrade Advisor, let’s review some changes in SQL Server 2005 that you should be aware of to better prepare for the upgrade process.

Deprecated and Discontinued Database Engine Functionality Deprecated features in SQL Server 2005 include features that will be removed in the future product releases. Some of the deprecated features will be removed in the next product release, while others will be removed in the releases following that one. The following are some of the deprecated features, which you should try to replace with the recommended items:

NOTE You can use the SQL Profiler event class Deprecation to trace the usage of these depre- cated features.

• The DUMP and LOAD statements are being deprecated, and the recommended approach is to instead use the BACKUP and RESTORE statements, respectively.

• The SETUSER statement is being deprecated, and the recommended approach is to instead use the EXECUTE AS statement.

• sp_addtype is being deprecated; instead, you should use CREATE TYPE. You should also avoid using the sp_attach_db and sp_attach_single_file_db stored proce- dures; instead, you should use the CREATE DATABASE statement with the FOR ATTACH or FOR ATTACH_REBUILD_LOG option.

• You should avoid using sp_renamedb, sp_dboption, and sp_resetstatus stored procedures; instead, you should use the ALTER DATABASE statement.

• You should avoid full-text search stored procedures, such as sp_fulltext_catalog; instead, you should use the CREATE/ALTER/DROP FULLTEXT CATALOG and CREATE/ALTER/DROP FULLTEXT INDEX statements.

• You should avoid using security stored procedures such as sp_addlogin, sp_adduser, and so on; instead, you should use statements such as CREATE LOGIN, CREATE USER, CREATE ROLE, and so on. • System tables are being replaced with backward compatibility views. The recom- mended approach is to use the new system catalog views. Direct updates to system tables are no longer allowed. 03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 48

48 CHAPTER 3 SQL Server 2005 Setup and Deployment

SQL Server 2005 does not support some of the features present in the earlier releases: • SQL Server 2005 no longer includes English Query.

• Tools such as isql.exe and rebuildm.exe are also not included; you should instead use sqlcmd.exe and setup.exe. If you need to rebuild the master database or rebuild the registry, you should run SQL Server 2005’s setup.exe from the command prompt and provide the appropriate parameters.

• The Northwind and Pubs sample databases are being replaced with a new sample database, AdventureWorks.

• The allow updates option of sp_configure is present but because direct updates to system tables are not supported, this option is meaningless. • Meta Data Services 3.0 is a component of Microsoft SQL Server 2000 that is no longer available in SQL Server 2005. Upgrading does not delete the existing reposi- tory tables in the msdb database. However, the repository engine that reads and updates the tables will not be available after you upgrade, and the repository tables will no longer be accessible. To remove the unused tables, you can manually delete them. Repository tables have the Rtbl prefix.

Breaking and Behavior Changes to the Database Engine Wherever possible, SQL Server 2005 provides backward compatibility so that applications can be easily migrated to SQL Server 2005. However, in order to better support some new features and to better position the product, Microsoft has introduced some breaking and behavioral changes in SQL Server 2005 that might require changes to your applications:

• SQL Server 2005 adds trigger_schema as the last column in the result set returned by the sp_helptrigger system stored procedure.

• In SQL Server 2000, the WITH keyword to specify table hints is optional. However, in SQL Server 2005, WITH is mandatory for table hints, except for single-word hints. For instance, the query SELECT * FROM master.dbo.sysobjects (TABLOCK, HOLDLOCK) works in SQL Server 2000 but not in SQL Server 2005. To make this query work in SQL Server 2005, you need to either specify the WITH clause or just keep a single table hint.

• In SQL Server 2000, column names in the ORDER BY clause are resolved to columns listed in the SELECT list, regardless of whether they are qualified. However, in SQL Server 2005, qualified column names and aliases in the ORDER BY clause are resolved to columns of tables listed in the FROM clause. Consider the following Transact-SQL script:

USE [Tempdb]; GO

IF OBJECT_ID(‘dbo.dblTest’) IS NOT NULL DROP TABLE dbo.dblTest; GO 03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 49

Upgrading to SQL Server 2005 49

CREATE TABLE dbo.dblTest (col1 int, col2 varchar(20)); GO

INSERT INTO dbo.dblTest SELECT 1, ‘X’; INSERT INTO dbo.dblTest SELECT 2, ‘U’; INSERT INTO dbo.dblTest SELECT 3, ‘A’; GO

SELECT col1 AS ‘col2’ FROM dbo.dblTest a ORDER BY a.col2; GO

If you run this script in SQL Server 2000 and SQL Server 2005, you will get different output with SQL Server 2000 than with SQL Server 2005. SQL Server 2000 ignores the table alias and maps the a.col2 specified in the ORDER BY clause to the column alias in the SELECT list and hence returns 1, 2, and 3. On the other hand, SQL Server 2005 honors the table alias and sorts the results on col2 in the dbo.tblTest table and hence returns 3, 2, and 1.

SQL Server 2005 Upgrade Advisor As mentioned earlier, you can use the Upgrade Advisor tool to analyze the system and installed SQL Server 2000 or SQL Server 7.0 components and identify issues that you must or should address before or after upgrading to SQL Server 2005. The Upgrade Advisor tool consists of two components: • Analysis Wizard—Analysis Wizard analyzes a system and saves the results into an XML file. Analysis Wizard does not modify your data or change settings on your computer. • Report Viewer—Report Viewer reads the results XML file generated by Analysis Wizard and displays the results of the analysis. It also allows you to sort and filter the results. Each upgrade issue listed on the Report Viewer screen contains a Tell Me More About This Issue and How to Resolve It link that you can click to obtain more information about the upgrade issue and the steps you need to take to resolve it.

The Upgrade Advisor documentation consists of a section on resolving upgrade issues, with categories such as Analysis Services Upgrade Issues, DTS Upgrade Issues, and Database Engine Upgrade Issues. Note that the Upgrade Advisor tool is not installed as part of SQL Server 2005 setup. You have to separately install it from the setup splash screen (splash.hta) by clicking the Install SQL Server Upgrade Advisor link. Figure 3.4 shows the Microsoft SQL Server Upgrade Advisor tool in the background, with Analysis Wizard in the foreground. 03_0672327783_ch03.qxd 8/8/05 2:10 PM Page 50

50 CHAPTER 3 SQL Server 2005 Setup and Deployment

FIGURE 3.4 The Upgrade Advisor tool is designed to analyze the existing SQL Server environment and identify and resolve any issues that might block the upgrade process.

Summary SQL Server 2005 setup is designed to minimize installation failures and improve the overall setup experience. This chapter introduces the concepts related to SQL Server 2005 setup and deployment. The chapter begins with an overview of SQL Server 2005 editions, giving you the informa- tion you need to choose the appropriate edition to suit your needs. The chapter also discusses the hardware and software requirements for SQL Server 2005. The subsequent section lists the improvements made to the setup process itself. The second part of this chapter discusses the upgrade process. It outlines the issues you should be aware of and describes the Upgrade Advisor tool, to better prepare for upgrad- ing to SQL Server 2005. Chapter 4, “A Tour of New Features in SQL Server 2005,” provides an introduction to the new features introduced in this biggest SQL Server release ever.