7. Install Microsoft SQL Server
Install Microsoft SQL Server 2000
Old Version Upgrade
Client installation
Summary
In Chapter 4th and chapter 5, we learned how to correctly plan the system space. In this chapter, we will officially install Microsoft SQL Server 2000. This chapter teaches you how to install Microsoft SQL Server 2000, the old version upgrade, and the user side.
Install Microsoft SQL Server 2000
You can install Microsoft SQL Server in three ways: local, remote, or unattended. Local installation will install SQL server on the machine you are using. Remote Installation installs SQL Server on another computer on the network. Automatic Installation stores all prompt responses for SQL Server installation in the file in advance, and automatically reads the response as needed during the installation process.
This chapter describes the three installation options in detail. If this is the first time you Install SQL Server, we recommend that you first familiarize yourself with the installation program through local installation.
Host Installation
Follow these steps to install your SQL Server ON THE HOST:
1. Put the SQL Server optical disk into the optical drive. If the system has set the automatic boot disc, a 7-1 dialog box is displayed. If your computer does not automatically start the installation settings, You need to manually execute the autorun.exe Program (located in the root directory of the disc ).
Figure 7-1 SQL Server Installation dialog box
Now there are two options on the left of the dialog box. You can select the installation component of SQL Server 2000 to continue the installation. For more information about how to install SQL Server 2000, see the software version or device that must be installed before installation.
2. If you choose to continue the installation, skip to step 4. If you want to install SQL Server 2000, select the OS option you want to reference in this dialog box, and then select the software you want to install. If your computer has loaded all applicable software, skip to step 3.
________________________________________
Description
If you need to install Microsoft Internet Explorer, Service Pack, or Microsoft Windows NT 4, you may be asked to restart and execute autorun.exe before continuing to Install SQL Server. After you install all required software, select the previous step to go back to the main installation screen and continue the installation steps.
________________________________________
3. Select the installation component of SQL Server 2000 to continue installation.
4. After you select continue installation, you will see the 7-2 dialog box. Select the database server to install the main components of SQL Server.
5. Now you will see the SQL Server 2000 Installation Wizard dialog box. If your computer is executing other programs, you must close them first. Follow the next steps to continue the installation.
6. The computer name dialog box is displayed. Select the Local Computer and follow the next steps to continue the installation.
7. Now you will see the SQL Server 2000 installation selection dialog box. Select a new SQL Server executor or install the client tool, and then follow the next steps to continue the installation.
Figure 7-2 "installation and selection" dialog box
8. Now you will see the user information dialog box. Confirm the name and company name. Follow the next steps to continue the installation.
9. The software authorization contract dialog box is displayed. Select accept authorization. Continue with the installation steps.
10. You will see the dialog box requesting the product identification code. Enter a 25-character product identification code (marked in yellow outside the optical box ). Follow the next steps to continue the installation.
11. The installation definition dialog box is displayed. Select the server and client tools and follow the next steps to continue the installation.
12. Now is the dialog box for executing the individual name. You can enter the expected name or use the default name of SQL Server. Follow the next steps to continue the installation.
13. Now you will see the installation type dialog box 7-3. You can choose a typical installation, minimum installation, or custom installation. For a typical installation, choose not to install the development tool or full-text search. Custom installation allows you to select the option to install. For minimum installation, the upgrade tool, online support, and management tools are not installed. Generally, users will choose a typical installation, so here we choose a typical installation as our installation exercise. You can select the location where you want to place SQL Server and data files. In the destination folder, you can select Browse to specify the address. Then, follow the next steps to continue the installation.
Figure 7-3 "installation type" dialog box
14. Now you see the service account dialog box (Figure 7-4 ). You can select a user account for Windows NT or Windows 2000, or an administrator account. No matter which account you use, you must have the permissions for log on as a service. If you are not sure how to set these user accounts, ask your system administrator or refer to the instructions for Windows NT and Windows 2000. Enter your SQL Server account name and password correctly. If you install your SQL Server on an independent workstation, you can use your local SYSTEM account. Then follow the next steps to continue the installation.
Figure 7-4 "service account" dialog box
15. The Authentication Mode dialog box (7-5) is displayed ). This step determines the level of SQL Server Security. You can select Windows Authentication mode or hybrid mode. If you select the Windows Authentication mode, all user permissions follow the Windows user security settings. If you select hybrid mode, you can separately set the security level of the administrator database. In hybrid mode, you must set a password for SA (SQL Server System Administrator Account. This password can be set to blank, but this setting will reduce the security of SQL Server. Select Windows Authentication mode, and then follow the next steps to continue the installation.
Figure 7-5 "Authentication Mode" dialog box
16. Now we can see the "Copy data folder" dialog box. Follow the next steps to continue the installation.
17. The authorization mode dialog box is displayed. You have two authorization options: user authorization or processor authorization.
Each computer that comes online to the server to access data requires a user authorization letter. The authorized client computer can use SQL server on the network without additional charges. The processor authorization is authorized to each processor that executes the SQL server. For example, if you want to execute SQL server on a group of 4 Processors, You need to purchase the authorization consent form for the four processors. When you purchase a sufficient number of authorization consent, you can connect your users (unlimited) to the processor.
Select continue to continue the installation of SQL server applications and data files. SQL Server automatically installs related files and components on your system. It may take several minutes to complete the installation. Please be patient!
18. When the installation is complete, you will see the installation completion dialog box. Select to complete all installation steps.
Congratulations! You have successfully installed SQL server on the server!
Remote Installation
If you want to install SQL Server on another computer on the network, you must install it remotely. The installation method is similar to the installation method of the host. The following are the detailed steps for Remote Installation.
1. Perform Installation Steps 1 to 5 on the host.
2. In the computer name dialog box, select a remote computer and enter the name of your remote system. Follow the next steps to continue the installation.
3. Now you will see the SQL Server 2000 Settings dialog box. Select a new SQL Server executor or install the client tool, and then follow the next steps to continue the installation.
4. the user information dialog box is displayed. Check whether the user name and company name are correct. Follow the next steps to continue the installation.
5. The software authorization contract dialog box is displayed. Select to accept the license agreement and continue the installation process.
6. Enter the product password. Enter a 25-Character Product password (marked in yellow outside the optical box ). Follow the next steps to continue the installation.
7. Now you can see the remote Settings dialog box (7-6 ).
Enter the account name, password, and domain name of the computer on which SQL Server is to be installed. Confirm that this account name is an account with the right to use software. You must enter the installation path in the target path on the remote computer. The path name must be in UNC (abbreviation of Universal Naming Convention) format. For example, // remoteserver/C $/program files/Microsoft SQL Server. Follow the next steps to continue the installation.
8. The installation definition dialog box is displayed. Select the server and client tools, and then click Next.
Figure 7-6 "remote settings" dialog box
9. Enter the execute Instance name dialog box. Enter the expected name or use the default name of SQL Server. Follow the next steps to continue the installation.
10. The set type dialog box is displayed. Similar to host-side installation, you can choose a typical, minimum, or custom installation method. Typically, you can choose not to install the development tool or full-text search. Customization allows you to select the option to install. For minimum installation, the upgrade tool, online support, and management tools are not installed.
11. Generally, users will choose a typical installation, so here we also choose a typical installation exercise. Here you can choose to place SQL Serve R and data files in the specified location. In the destination folder, you can select Browse to specify the address. After the installation is complete, follow the next steps to continue the installation.
Now you see the service account dialog box (Figure 7-4 ). Enter the name and password you want to set in the text box. (If the account name is not set, you can use the account name and password of the Windows 2000 or Windows 2000 administrator ). Follow the next steps to continue the installation.
12. The Authentication Mode dialog box is displayed. This step determines the level of SQL Server Security. You can select Windows Authentication mode or hybrid mode. If you select the Windows Authentication mode, the permissions of all users follow the Security Settings of Windows users. If you select a hybrid database, you can separately set the security level of the administrator database. In hybrid mode, you must set a password for SA (SQL Server System Administrator Account. This password can be set to blank, but this setting will reduce the security of SQL Server. Select Windows Authentication mode, and then follow the next steps to continue the installation.
13. The authorization mode dialog box is displayed. You have two authorization options: user authorization or processor authorization. For details about the two authorization options, refer to the 16th installation steps on the host.
14. After SQL Server is successfully connected to a remote computer and confirmed online, the subsequent installation steps of the remote computer are the same as those on the host. All subsequent options can be installed by referring to the host installation method.
During the Remote Installation of SQL Server, SQL Server generates a file named sqlstp. log. This file is stored in the % SystemRoot % file of Windows NT or Windows 2000. The % SystemRoot % folder is a typical C:/winnt folder. This file lists all the steps that have been performed and errors that have occurred during installation. If an error occurs during Remote Installation, this file can help you identify the cause of the error.
Automatic Installation
SQL Server provides options for automatic installation. This installation option is very helpful when you have many computers to Install SQL Server. The steps for automatic installation are as follows:
1. Change the disk of the CD-ROM in the Command dialog box.
2. execute any of the following batch files (. BAT) for automatic installation:
O if you want to install a typical SQL server option in Windows 95/98, Windows NT, or Windows 2000, run the sq1_. BAT file. These tools will be installed using the initialization file sqloud. ISS.
O sqlcst. bat. If you want to install SQL Server's custom options in Windows 95/98, Windows NT, or Windows 2000, run the sqlcst. BAT file. These tools will be installed using the initialization file sqlcli. ISS. The client function is installed in C:/program files/Microsoft SQL Server/80/file.
O sqlrem. bat is used to delete all SQL Server Components in the system. You must specify the path of the SQL Server installation directory as a parameter.
3. Before executing a batch file, you must first specify the related. ISS counters for the system. For example, you may want to change the processor authorization mode preset in the authorization mode to the user authorization mode. To make such a change, you must find the license in the correct. ISS file and change licensemode = perserver to licensemode = perseat.
Old Version Upgrade
If your computer has an earlier version of Microsoft SQL Server 6.5 or Microsoft SQL Server 7 data, you can simply upgrade it to SQL Server 2000. To upgrade SQL Server 6.5, you must use the Version Upgrade Wizard. To upgrade SQL Server 7, the upgrade process is automatically included when You Install SQL Server 2000.
SQL Server 7 data upgrade
When You Install SQL Server 2000, SQL Server 7 data is automatically upgraded to the installation step. After the installation steps are completed, SQL Server 2000 performs a series of data upgrade steps. The duration of the upgrade depends on the amount of data in the database and table. During the upgrade process, the system displays the update status information (Figure 7-7 ).
Figure 7-7 SQL Server 7 upgrade status
SQL Server 6.5 data upgrade
Before upgrading your SQL Server 6.5 data to the SQL Server 2000 format, make sure that your SQL Server 6.5 has the following:
• Confirm that the user's online sp_configure execution period parameter is set to at least 25. Because the new version of the Network Connection Library may need to exceed the preset value (15) to perform the upgrade.
• Back up your data files in SQL Server 6.5, including the master database.
• Use DBCC tests to determine Database Consistency.
• Tempdb should have at least 10 megabytes (MB). Although 10 MB is enough, we recommend 25 MB.
• Disable all previous auto-Start Settings.
• Stop all Replication Services and make sure there are no replication records in the replication record file.
• Check whether SQL Server 6.5 Service Pack 3 or later is installed.
After the above confirmation, after installing SQL Server 2000, you can convert SQL Server 6.5 data to SQL Server 2000 format by following these steps:
1. In the Start Menu, point to the Assembly, then to Microsoft SQL Server-switch, click the SQL server upgrade wizard, and then click Next.
2. Now you will see 7-9 data and object transfer images. The SQL Server Upgrade Wizard converts all old database objects and data to the new format by default. If you want to confirm whether the format conversion is successful, check validate successful object data transfer. Although the validation process takes a long time, we recommend that you confirm it.
If you want to determine the data consistency after conversion, check exhaustive data integrity verification. Although this option takes a longer time to convert data, it ensures the integrity of the data conversion. If you have not recently executed SQL Server 6.x DBCC, you should execute this option to ensure that the data conversion program is not affected when the database is damaged. If your system uses a tape drive, there is an option to use tape instead of using a named pipe for data transmission. Follow the next steps to continue the installation.
Figure 7-8 welcome to the SQL Server Upgrade Wizard
Figure 7-9 data and object transfer
3. Now you will see the SQL Server Upgrade Wizard logon screen (Figure 7-10 ). You must select the server name from the drop-down list and enter the password of the system administrator in SQL Server 6.5. You must also enter a system administrator password for this SQL Server 2000 instance. If you want to set parameters for one of the servers, enter the parameters in the text box corresponding to optional startup arguments. These options can include trace tags. If you do not need to set the startup parameter, leave the text box blank. (For more information, see the books online index to find startup options ). Follow the next steps to continue the installation.
Figure 7-10 SQL Serve R Upgrade Wizard logon screen
4. the SQL Server Upgrade Wizard dialog box is displayed, and a warning message is displayed. This message warns the SQL Server Upgrade Wizard to stop and restart the SQL Server 6.5 and SQL Server 2000 databases, and does not allow any user to log on to these two servers during the conversion process. Click OK to continue the installation.
________________________________________
Description
Now the system will convert the format of the two database systems.
________________________________________
5. The code page selection screen is displayed. This dialog box allows you to specify the word set code record page used for conversion (used to determine the character set ). Unless the special characters you need are different from the previous settings of the system, we recommend that you accept the default settings. Select next to continue installation
6. the SQL Server Upgrade Wizard will communicate with the SQL Server 6.5 database to determine the amount of data to be converted, and list the data list (7-11) on the upgrade databases to SQL Server 2000 screen ).
Figure 7-11 upgrade databases to SQL Server 2000
The database to be converted is displayed in the list box on the right. If you do not want to convert any database, click the Database Name and press exclude. The database to be converted will appear in the list box on the left. Unless you will not use this database in the future, all databases should be converted. Follow the next steps to continue the installation.
7. The following figure shows the database creation (7-12 ). This dialog box allows you to specify how to create a database. Generally, you only need to accept the pre-installed data. If you want to specify a new hard disk location for the file, change this setting. Follow the next steps to continue the installation.
Figure 7-12 database creation
________________________________________
Description
The first option to create a database is to use the default installation. During SQL Server 6.5 conversion, SQL Server creates a large enough file to store the data and objects during conversion, but it does not create any available space for these files. It also creates a log file for each converted database. Through the edit button, you can change the log file name and file path, initial file size, and growth increment.
The second option for creating a database is use databases already created in SQL Server 2000. With this option, you can use SQL Server 2000 to create data and log files before starting the Upgrade Wizard. SQL Server will use these databases for the converted data.
The third option for creating a database is to use an SQL command file (SCRIPT ). Command files should include the create database statement required to create data and log files. Select the Browse button to specify the location of the command file.
The second and third options are not recommended here, because the database name in SQL Server 2000 is the same as that in the original SQL Server 6.5, however, the SQL Server 2000 file may occupy more disk space than the original SQL Server 6.5 file. If you use the preset installation method, SQL Server will automatically help you estimate the growth after data conversion.
________________________________________
8. The system Settings dialog box (7-13) appears ). This dialog box allows you to specify which system objects and settings are to be transferred to the new database. If you select the server configuration check box, all login accounts and remote login account registration data will be converted. If you select the SQL Executive Settings check box, all scheduled tasks are converted. If you select the replication Settings check box, the support for replication will also be converted. (In this example, we do not allow the replication settings option, because the SQL Server 6.5 database does not have this feature, so there is no data to be converted here. The content of database replication will be discussed in chapter 26 .)
Figure 7-13 system settings
In the advanced settings of the Upgrade Wizard, you can select the ANSI nulls option or reference the recognition item option. ANSI nulls affects the setting of null values for comparison. If this option is set to on, as long as one of the operation parameters is null, the comparison operation (= and <>) will always return null. If this option is set to off, true will be returned when both operation parameters are null. However, if one of them is null and the other is not null, false will be returned.
The reference recognition option determines how SQL Server 2000 processes double quotation marks. If this option is set to on, double quotation marks are considered as recognition symbols, such as field names. If it is set to off, double quotation marks are treated as identifiers. The function is the same as single quotation marks. If mixed is selected, SQL Server 2000 follows the quoted identifiers setting on the specified object in SQL Server 6.5. If you are not familiar with the setting of this option, you 'd better select mixed and continue the installation step.
9. After a short wait, the SQL Server Upgrade Wizard dialog box (7-14) appears ). This dialog box allows you to view all selected conversion options. If you still need to modify the settings, select the previous step and change the settings. If no modification is required, continue the conversion after the operation is completed.
Figure 7-14 SQL Server Upgrade Wizard
10. the SQL server upgrade script interpreter dialog box (7-15) is displayed ). This dialog box displays updated items continuously, so that the administrator can understand the progress of the upgrade.
Figure 7-15 SQL server upgrade script interpreter dialog box
________________________________________
Description
The length of the conversion process is closely related to the size of the database to be converted and whether to choose to verify it. Sometimes the conversion process can be up to several hours.
________________________________________
After the upgrade process is complete, a dialog box is displayed. Press OK to close the dialog box. Then choose to close the SQL server upgrade script interpreter dialog box.
Congratulations! You have successfully completed the SQL Server 2000 upgrade!
Client installation
The steps for installing the client are also very simple. refer to the following steps:
1. <local installation> steps 1 to 9.
2. the SQL Server 2000 installation definition dialog box is displayed. Select client tools only. Follow the next steps to continue the installation.
3. The Select installation component dialog box is displayed. Select the required option and click Next. You can choose Administrative Tools, client connectivity, online books, development tools, code samples, or a combination of any of the preceding options. Predefined options include administrative tools, client connectivity, online books, and development tools.
4. When a dialog box appears, click Next to continue until the installation is completed.
Summary
The pre-planning for installation is helpful for SQL Server 2000 installation. The tools provided by SQL Server 2000 allow you to smoothly complete version upgrades. After SQL Server 2000 is installed, you can learn how to create and manage databases in the next step. This starts from learning SQL Server Enterprise Manager. In Chapter 8th, you will learn how to manage and set SQL Server, be familiar with server programs, and learn how to start, stop, and pause SQL Server services.