If you are using either SQL Server 6.5 or 7.0 in production, you will need to plan and prepare to upgrade your existing installation to SQL Server 2000. For this process to be successful and as painless as possible, you first need to understand the upgrade options available to you. This includes determining whether you need to keep your existing installation intact. You also need to determine how to minimize downtime. Next, you need to understand the hardware and software requirements for an upgrade. Finally, you need to prepare your existing installation for the actual upgrade.
SQL Server 2000 is designed to support multiple versions of SQL Server simultaneously on the same computer. It accomplishes this in two different ways. The first method is through the use of version switching, and the second method is through the use of multiple instances. Through the use of these two methods, SQL Server 6.5, SQL Server 7.0, and SQL Server 2000 can coexist on the same computer, although only two versions may be running at any given time (one of which must be SQL Server 2000).
Version switching allows SQL Server 7.0 or SQL Server 2000 to be installed as the default instance on a computer on which SQL Server 6.5 is already installed. You can then use the Vswitch.exe utility to switch between SQL Server 6.5 and either SQL Server 7.0 or SQL Server 2000 (but not both). Using version switching allows you to switch between default instances, controlling which version of SQL Server (including any version-specific tool) is running as the default instance at any given point in time. It does not allow multiple instances or versions to run simultaneously. The Vswitch utility is available from the Start menu, in the Microsoft SQL Server - Switch program group. It is also available in the \Program Files\Microsoft SQL Server\Mssql\Binn folder.
Using a named instance allows you to install and run SQL Server 2000 as a named instance on a computer on which either SQL Server 6.5 or SQL Server 7.0 is installed without performing a version upgrade of that installation. This allows you to keep your existing version of SQL Server intact and running while also running SQL Server 2000 on the same computer. Installing SQL Server 2000 as a named instance on a computer on which SQL Server 7.0 is installed is the only way to maintain the default instance of SQL Server 7.0 on that computer. When you install SQL Server 2000 as a named instance on a computer on which SQL Server 7.0 is also installed, all SQL Server 7.0 client tools are upgraded to SQL Server 2000 client tools for all instances.
When you decide to upgrade SQL Server 6.5, you have only one upgrade process available. However, you have several methods to choose from. Your need to have SQL Server 6.5 running simultaneously with SQL Server 2000 after the upgrade might determine this decision. When you decide to upgrade SQL Server 7.0, you have two separate upgrade processes to choose between. Your need to migrate server and replication settings, as well as the need to minimize server downtime, might determine this choice. You must also determine whether to use a default or a named instance for your SQL Server 2000 installation. Your need to have multiple versions of SQL Server running simultaneously on the same computer might determine this choice.
If you are using SQL Server 6.5 and you want to upgrade your installation to SQL Server 2000, you must perform a version upgrade using the SQL Server Upgrade Wizard (this requires SQL Server 6.5 SP5). When you perform a version upgrade, you can choose to upgrade some or all of your user databases along with the system databases. The SQL Server Upgrade Wizard can transfer replication settings, SQL Executive settings, and most server configuration settings. The upgrade process includes built-in recovery methods to restart and resume an upgrade if it fails during the upgrade process. During this upgrade process, SQL Server 6.5 must be offline and unavailable to users. To perform an upgrade from SQL Server 6.5, you must also install SQL Server 6.5 SP5.
The SQL Server Upgrade Wizard can upgrade a computer running SQL Server 6.5 to SQL Server 2000 using either the local hard drive or a local tape drive. Using the local hard drive gives the best performance and is the most reliable. Use a tape drive only when you do not have sufficient hard drive space. The SQL Server Upgrade Wizard can also upgrade from one computer running SQL Server 6.5 to another computer running SQL Server 2000. Regardless of the method you choose, the SQL Server Upgrade Wizard can only upgrade to the default instance; it cannot upgrade SQL Server 6.5 to a named instance.
After the SQL Server Upgrade Wizard finishes the upgrade, you will have two independent installations of SQL Server with two independent sets of identical data (at least initially). SQL Server 6.5 is not removed during the upgrade process (although all client tools are upgraded). You should verify the success of the upgrade before you remove the SQL Server 6.5 installation.
If you are using SQL Server 7.0 and you want to upgrade your installation to SQL Server 2000, you have a choice of two processes. Your first choice is to perform a version upgrade of SQL Server 7.0 to SQL Server 2000 using the SQL Server 2000 Setup program. Version switching back to SQL Server 7.0 after the upgrade is not an option. During the version upgrade process, the Setup program replaces and overwrites your SQL Server 7.0 installation. All program files (including all tools and utilities) are upgraded and all databases are converted to SQL Server 2000. Replication settings, SQL Server Agent settings, and most server configuration settings are retained. However, SQL Server 7.0 Profiler traces and servers registered with SQL Server Enterprise Manager are not retained. During (and after) this upgrade process, SQL Server 7.0 must be offline and unavailable to users.
Your second choice is to use the Copy Database Wizard to perform an online database and associated meta data upgrade of selected SQL Server 7.0 user databases. Meta data information includes such things as logon information and user-specific objects associated with user databases. Performing an online database upgrade allows you to upgrade any or all of your user databases without having to shut down SQL Server 7.0 during the upgrade. In addition, your SQL Server 7.0 installation remains intact after the upgrade. If you plan to use this process, you can install SQL Server 2000 as a named instance on the same computer that is running SQL Server 7.0 as the default instance. In addition, the Copy Database Wizard can upgrade databases from remote servers. Finally, you can also schedule the online database upgrade to occur at a specified time because the Copy Database Wizard creates a DTS package that is scheduled as a job. DTS packages and jobs are covered in Chapter 7.
When upgrading servers involved in replication, you must upgrade the server functioning as the Distributor first, followed by the Publisher and finishing with the Subscribers. If you update servers in this sequence, you can continue to publish and replicate data during this process even though servers are running different versions of SQL Server. If you are using the immediate updating functionality or are using File Transfer Protocol (FTP), additional upgrade steps are required. Refer to "Replication and Upgrading" in SQL Server Books Online for more detail.
The process of upgrading an existing SQL Server installation to SQL Server 2000 has certain hardware and software requirements, in addition to the hardware and software requirements for installing SQL Server 2000. These requirements differ depending on the version of SQL Server being upgraded, and on the type of upgrade process being performed.
If you are upgrading a SQL Server 6.5 installation running on Windows NT 4.0 and plan to upgrade on the same computer, you must apply Service Pack 5 or later and Internet Explorer 5.0 or later to Windows NT 4.0 before upgrading to SQL Server 2000. You must also apply SQL Server 6.5 Service Pack 5 or later to your SQL Server 6.5 installation. However, if you are performing a computer-to-computer upgrade, you need only apply SQL Server 6.5 Service Pack 3 or later to your SQL Server 6.5 installation. Regardless of the upgrade method, the SQL Server Upgrade Wizard uses named pipes. SQL Server 6.5 and SQL Server 2000 must be set to use the default pipe (\\.\pipe\sql\query). Finally, upgrading SQL Server 6.5 to SQL Server 2000 requires available hard drive space equal to approximately 1.5 times the size of the SQL Server 6.5 user databases. This additional hard drive space is required only during the upgrade process. You can use the SQL Server Upgrade Wizard to estimate the amount of space required to complete the upgrade.
If you are upgrading a SQL Server 7.0 installation running on Windows NT 4.0 and plan to perform a version upgrade, you must apply Service Pack 5 or later and Internet Explorer 5.0 or later to Windows NT 4.0 before upgrading to SQL Server 2000. You do not need to apply any service packs to SQL Server 7.0 prior to upgrading to SQL Server 2000. Performing a version upgrade of SQL Server 7.0 requires the use of named pipes. SQL Server 7.0 and SQL Server 2000 must be set to use the default pipe (\\.\pipe\sql\query). However, an online database upgrade (using the Copy Database Wizard) does not require named pipes; rather, it will use any available Net-Library. Finally, an upgrade of SQL Server 7.0 to SQL Server 2000 does not require any additional hard drive space, although the Copy Database Wizard might require additional space if the database is copied rather than moved.
You must perform the following tasks on your SQL Server installation prior to commencing the upgrade:
You can perform a version upgrade of SQL Server 6.5 to SQL Server 2000 on a single computer or between computers. You must upgrade to the default instance; you cannot upgrade to a named instance. When installing SQL Server 2000 on the same computer, you can use the version switch utility to switch between versions to verify the upgrade. You can perform either a version upgrade of SQL Server 7.0 on a single computer or an online database upgrade of one or more databases between instances on a single computer from a remote computer. If you perform an online database upgrade, SQL Server 7.0 remains available to users during the database upgrade process. However, an online database upgrade does not upgrade server settings and cannot be used when replication is involved. Finally, you need to prepare the production databases for the upgrade and make backups to ensure recoverability in case of a failure.