Home > Articles

This chapter is from the book

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 generates 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.

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, repopulate 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:

  • 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 procedures; 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 recommended approach is to use the new system catalog views. Direct updates to system tables are no longer allowed.

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 repository 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
    
    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.

Figure 3.4

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.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020