ch06

Lemur zaprasza

Chapter 6
Installing or Upgrading SQL Server







Installing SQL Server

Step 1: Running Setup
Step 2: Name and Organization
Step 3: Licensing Mode
Step 4: Installation Path
Step 5: Master Device
Step 6: Books Online
Step 7: Installation Options
Step 8: Set Up SQL Executive User Account
Step 9: Wait and Watch

Upgrading SQL Server

Step 1: Run Setup
Step 2: Check Upgrade Option
Step 3: Name, Organization, and Licensing Mode
Step 4: Continue or Exit Upgrade
Step 5: Installation Path
Step 6: Upgrade Master Device
Step 7: Books Online
Step 8: Executive Service User Account
Step 9: Wait and Watch

Starting and Stopping SQL Server
Removing SQL Server
Installing Client Tools

Step 1: Run Setup
Step 2: Install Client Utilities
Step 3: Select Utilities

Configuring Clients
Troubleshooting Installation and Upgrade

Error Log and Windows NT Application Log
Start SQL Server from the Command Line

Summary






In this chapter, you walk through the actual installation and upgrade of SQL Server
as well as the installation of software for the client PCs. Take a look at what the
SQL Server installation program actually loads on your computer. Following are the
directories created from the SQL Server root directory (MSSQL) during installation:


BACKUP: Default backup directory
BIN: Windows-based and DOS-based DB-Library TSRs and DLLs
BINN: SQL Server NT server, Dynamic Link Library files (DLLs) and client
executable files as well as online help files
CHARSETS: Character sets and sort order files
DATA: SQL Server devices and DTC log file
INSTALL: Installation scripts and output files
LOG: Error log files
REPLDATA: Distribution databases' working directory
SNMP: The MSSQL.MIB file for SNMP
SQLOLE: SQLOLE DMO Visual Basic samples
SYMBOLS: SQL Server debug files


The following services are installed:


MSDTC (SQL Server Distributed Transaction Coordinator)
MSSQLServer (SQL Server)
SQLExecutive (SQL Executive)


The following utilities are installed:


SQL Setup: Enables you to configure some SQL Server startup parameters and network
support, and remove SQL Server after installation
SQL Service Manager: Used to start and stop SQL Server
ISQL/W: Utility to issue SQL queries
SQL Security Manager: Used to set up integrated security
SQL Performance Monitor: Used to tune SQL Server performance
SQL Enterprise Manager: Primary tool used to manage SQL Server and SQL Server
objects
SQL Client Configuration utility: Used to set up SQL Server connection information
and check versions of the DB-Library installed
SQL Trace: Utility to monitor and record database activity
MS Query: Query application that provides many features for querying data (such
as creating queries using drag and drop)
MS DTC: Microsoft Distributed Transaction Coordinator
SNMP Support: Simple Network Management Protocol Management Information Base
(SNMP MIB) and SNMP agent
SQL Server Web Assistant: Creates HTML files as the result of a query
BCP: Bulk Copy utility to import and export flat files with SQL Server


Installing SQL Server
Before installing SQL Server, make sure that you have read through the documentation
regarding installation that ships with SQL Server 6.5. Also make sure that your system
meets the minimum requirements. To help you with your installation, use the worksheet
at the end of this chapter.





TIP: One of the problems that occurs quite often on new SQL Server installations
is trying to install SQL Server with a user account that does not have the correct
NT permissions to create new directories and files. If you get the error message
Can't create directory, make sure that you are using an account with the
correct privileges. Try creating the directory with File Manager. If you have the
correct privileges, you will be able do so; otherwise, use an account that has the
correct permissions.






Step 1: Running Setup
Installing SQL Server requires running the setup program, located on the SQL Server
6.5 CD-ROM. The CD-ROM contains several directories, including different directories
for each of the currently supported microprocessors:


\I386 for Intel machines
\ALPHA for Digital Alpha AXP machines
\PPC for PowerPC machines
\MIPS for MIPS processors


Select the correct directory for the processor you are using and run the setup
program. The window displayed in Figure 6.1 appears.
Figure 6.1.
The SQL Server setup window.
Step 2: Name and Organization
Click the Continue button. The Name and Organization dialog box appears (see Figure
6.2).
Figure 6.2.
The Name and Organization dialog box.

Fill in your name, organization, and the product ID and click the Continue button.
Another dialog box appears, prompting you to verify that the information you just
entered is correct. If the name, organization, and product ID are correct, click
the Continue button. The SQL Server 6.5 Options dialog box appears (see Figure 6.3).
Step 3: Licensing Mode
Make sure that the Install SQL Server and Utilities option button is selected
in the SQL Server 6.5 Options dialog box. Click the Continue button. The Choose Licensing
Mode dialog box appears (see Figure 6.4). Select the correct licensing mode for the
SQL Server you have purchased and click the Continue button. When the licensing verification
dialog box appears, read the agreement, check the verification checkbox, and click
the OK button.
Figure 6.3.
The SQL Server 6.5 Options dialog box.

Figure 6.4.
The SQL Server Licensing Mode dialog box.
Step 4: Installation Path
After you have read the licensing agreement, the SQL Server Installation Path
dialog box appears (see Figure 6.5). Select the correct drive and directory for the
SQL Server installation and click the Continue button.
Figure 6.5.
The SQL Server Installation Path dialog box.
Step 5: Master Device
The Master Device Creation dialog box appears (see Figure 6.6). Select the correct
drive, directory, filename, and size for the master device and click the
Continue button.
Figure 6.6.
The Master Device Creation dialog box.





TIP: The minimum default size is 25M. I recommend making the master
device at least 35M to allow for expansion and a larger temporary database. I also
recommend using the default filename, master.dat, because it has become
a standard and makes for easy reference when looking at documents or talking to tech
support. By default, the master device is located in the \DATA
directory off the SQL Server home directory.





Step 6: Books Online
The SQL Server Books Online dialog box appears (see Figure 6.7). Select one of
the following radio buttons:


Install on Hard Disk
Install to Run from CD
Do Not Install


Click the Continue button.
Figure 6.7.
The SQL Server Books Online dialog box.





TIP: I recommend installing Books Online. Although the space requirements
are about 15M, it is space well spent. The documentation is very good and has search
and find features that help you quickly track down specific topics and problems.






Step 7: Installation Options
The Installation Options dialog box appears (see Figure 6.8). Use this dialog
box to change the default character set or sort order, or to add additional network
support. You can also enable SQL Server and the SQL Executive to automatically restart
when Windows NT is rebooted by checking the Auto Start checkboxes for SQL Server
and the SQL Executive.
Figure 6.8.
The Installation Options dialog box.

To change the character set, click the Sets button. The Select Character Set dialog
box appears (see Figure 6.9). Select a character set from the list and click the
OK button.
To change the sort order, click the Orders button in the Installation Options
dialog box. The Select Sort Order dialog box appears (see Figure 6.10). Select the
new sort order and click the OK button.
Figure 6.9.
The Select Character Set dialog box.

Figure 6.10.
The Select Sort Order dialog box.

To add additional network support, click the Networks button in the Installation
Options dialog box. To start SQL Server and the SQL Executive as NT services when
the NT server is booted, select the proper checkbox options (refer back to Figure
6.8). After you have made your selections, click the Continue button.





TIP: If you are setting up the NT server to be a dedicated SQL Server system,
select the Auto Start SQL Server at Boot Time and the Auto Start SQL Executive at
Boot Time checkboxes. If the NT server goes down momentarily because of a power outage,
SQL Server starts automatically when the NT server reboots (if SQL Server and SQL
Executive are NT services).





Step 8: Set Up SQL Executive User Account
The next step is to assign an NT user account to the SQL Executive service using
the SQL Executive Log On Account dialog box (see Figure 6.11). If you created a special
account for the Executive Service, enter the account name, password, and password
confirmation. To use the local system account instead, check the appropriate option
button. When you have made your choice, click the Continue button.
Figure 6.11.
The SQL Executive Log On Account dialog box.
Step 9: Wait and Watch
Step 9 is the "wait-and-watch" step or the "go-do-something-else"
step. The setup program begins to create the SQL Server directories and load the
appropriate files (see Figure 6.12).
Figure 6.12.
SQL Server setup copying files.

Once the file copy is complete, SQL Server begins to create the master device
(see Figure 6.13).
Figure 6.13.
SQL Server setup creating the master device.

The other devices and databases are created and the registry is updated; when the
setup program is complete, the SQL Server Completed dialog box appears (see Figure
6.14). To use SQL Server, you must now reboot the server.
Congratulations--SQL Server installation is complete!
Figure 6.14.
The SQL Server Completion dialog box.
Upgrading SQL Server
The upgrade procedure is very similar to the installation procedure, except that
a few questions are skipped because the server is already running. Before starting
the upgrade, make sure that you have performed all the items on the upgrade checklist
described in Chapter 5, "Planning an Installation or
Upgrade." As a reminder, make sure that you do the following:


Perform database backups
Back up SQL Server files, devices, and directories
Back up the NT registry
Make sure that the SQL Server configuration parameter open databases
is equal to or greater than the current number of databases on the SQL Server you
are upgrading
Run CHKUPG65.EXE







SQL Server 6.0 to SQL Server 6.5
Before upgrading from SQL Server 6.0 to SQL Server 6.5, here is a quick checklist
of the compatibility issues between the two systems:






You cannot run SQL Server 6.0 and SQL Server 6.5 side by side on the same machine.
SQL Server 6.5 can read SQL Server 6.0 databases.
SQL Server 6.0 with service pack 3.0 (available from Microsoft) can read a SQL
Server 6.5 database.












Step 1: Run Setup
Upgrading SQL Server requires running the setup program located on the SQL Server
6.5 CD-ROM. The CD-ROM contains several directories, including directories for each
of the currently supported microprocessors:


\I386 for Intel machines
\ALPHA for Digital Alpha AXP machines
\PPC for PowerPC machines
\MIPS for MIPS processors


Select the correct directory for the processor you are using and run the setup
program. When the SQL Server Welcome dialog box appears, click the Continue button.
The SQL Server Already Installed dialog box appears (see Figure 6.15). Click Continue.
The SQL Server 6.5 Options dialog box appears.
Figure 6.15.
The SQL Server Already Installed dialog box.
Step 2: Check Upgrade Option
Make sure that the Upgrade SQL Server option button is selected in the SQL Server
6.5 Options dialog box and click the Continue button (see Figure 6.16).
Figure 6.16.
The SQL Server 6.5 Options dialog box.
Step 3: Name, Organization, and Licensing Mode
The Name and Organization dialog box appears with the current name and organization
filled in from the previous SQL Server (refer back to Figure 6.2). Fill in the product
ID and click the Continue button. Another dialog box appears, prompting you to verify
that the information you just entered is correct. If the name, organization, and
product ID are correct, click the Continue button. The Choose Licensing Mode dialog
box appears (refer back to Figure 6.4). Select the correct licensing mode for the
SQL Server you have purchased and click the Continue button. When the licensing verification
dialog box appears, read the agreement, check the verification checkbox, and click
the OK button.
Step 4: Continue or Exit Upgrade
The S QL Server Upgrade dialog box appears (see Figure 6.17). To stop the upgrade,
click the Exit button. To continue the upgrade, click the Resume button.
Figure 6.17.
The Upgrade SQL Server dialog box.
Step 5: Installation Path
The SQL Server Installation Path dialog box appears (refer back to Figure 6.5).
The current directory and drive for the existing SQL Server is the default. To change
the directory and drive, select the correct drive and path for the SQL Server installation
and click the Continue button.
Step 6: Upgrade Master Device
The SQL Server Upgrade Master Device Path dialog box appears (see Figure 6.18).
The drive and path must point to the master device being upgraded to SQL
Server 6.5. If the drive and directory displayed are invalid, select the correct
drive, directory, and filename and click the Continue button.
Figure 6.18.
The SQL Server Upgrade Master Device Path dialog box.
Step 7: Books Online
The SQL Server Books Online dialog box appears (refer back to Figure 6.7). Select
one of the following radio buttons:


Install on Hard Disk
Install to Run from CD
Do Not Install


Click the Continue button.
Step 8: Executive Service User Account
The SA (SQL Server system administrator) Password dialog box appears (see Figure
6.19). Enter the sa password and confirmation password and click the Continue
button. The SQL Executive Log On Account dialog box appears (refer back to Figure
6.11). If you created a special account for the Executive Service, enter the account
name, password, and password confirmation. If you want to use the local system account
instead, check the appropriate option button. When you have made your choice, click
the Continue button.
Figure 6.19.
The SA Password dialog box.
Step 9: Wait and Watch
You are prompted by the Upgrade SQL Server dialog box (see Figure 6.20). To continue
the SQL Server upgrade, click the Resume button. To halt the upgrade, click the Exit
button. If you click the Resume button, you enter a waiting period while the SQL
Server 4.2x or 6.0 installation is upgraded to SQL Server 6.5. When the upgrade is
complete, the Microsoft SQL Server 6.5 Completed dialog box appears. To run SQL Server
6.5, you must now reboot the server.
Figure 6.20.
The Upgrade SQL Server dialog box.
Starting and Stopping SQL Server
If you checked the Auto Boot options for SQL Server and the SQL Executive, the
two services start automatically when the NT server reboots. The easiest way to start,
stop, pause, or check the status of SQL Server and SQL Executive is to use the SQL
Service Manager (see Figure 6.21).
Figure 6.21.
The SQL Service Manager.

The SQL Server Manager is located in the Microsoft SQL Server 6.5 program group,
which was created during the installation or upgrade. To start the SQL Server Manager,
double-click the icon. If SQL Server is running, the traffic light is green. If the
service is stopped, the traffic light is red. To start the server, double-click the
light next to the Start/Continue label.
To stop SQL Server, double-click the light next to the Stop label. To
pause SQL Server, double-click the light next to the Pause label. Pausing
SQL Server does not halt queries in process; it prevents new users from logging in
to SQL Server. When SQL Server is paused, users currently logged in to SQL Server
can continue to work as normal.
Controlling the SQL Executive is the same as controlling SQL Server, except that
you cannot pause the SQL Executive. To perform stop, start, and status checks on
SQL Executive, use the drop-down Services list box and select SQLExecutive instead
of MSSQLServer.
You can also start SQL Server and SQL Executive from the Windows NT Services dialog
box located in the Windows NT control panel. If you want to set up SQL Server and
SQL Executive to start when the NT server is rebooted, use the Services dialog box
in the control panel or the SQL setup program to set the Auto Boot options (refer
back to Figure 6.8).





NOTE: The service name for Microsoft SQL Server has changed. In previous versions,
the name used for the service was SQLServer. With SQL Server 6.5, the name
is MSSQLServer.





Removing SQL Server
If you want to remove a SQL Server installation, do not delete the SQL Server
directories. Run the setup program and select the Remove SQL Server option from the
SQL Server Options dialog box (see Figure 6.22).
Figure 6.22.
The SQL Server Options dialog box.

Click the Continue button; the Remove SQL Server dialog box appears. Select the Remove
Files option to clear the SQL Server entries from the system registry and remove
all the SQL Server files installed; otherwise, only the registry is cleared. If you
select Remove Files, you must manually delete a few files used by the setup program
when the SQL Server removal is complete. Remove the leftover files by removing the
SQL Server home directory, which also is left over after a file removal.
Installing Client Tools
SQL Server provides several different tools that allow computers acting as clients
to connect to SQL Server. The following are the current 32-bit operating systems
supported by the SQL Server client tools:


Microsoft Windows NT Server version 3.51
Microsoft Windows NT Workstation version 3.51
Microsoft Windows 95


If you are using one of these 32-bit operating systems, you can install the following
tools:


ISQL/W: Utility to issue SQL queries
SQL Security Manager: Used to set up integrated security
SQL Enterprise Manager: Primary tool used to manage SQL Server and SQL
Server objects
SQL Client Configuration utility: Utility to set up SQL Server connection
information and check versions of the DB-Library installed
SQL Trace: Utility to monitor and record database activity
MS Query: Query application that provides many features for querying data
(such as creating queries using drag and drop)
MS DTC: Microsoft Distributed Transaction Coordinator client support
SQL Server Web Assistant: Creates HTML files as the result of a query
ODBC drivers: Installs other ODBC drivers for replication use
BCP: BulkCopy utility to import and export flat files with SQL Server


The following 16-bit operating systems are supported:


Windows 3.1 and Windows 3.11 (Workgroups)
MS-DOS


The following tools are available for Windows 3.1 and Windows 3.11:


ISQL/W: Utility to issue SQL queries
SQL Client Configuration utility: Utility to set up SQL Server connection
information and check versions of the DB-Library installed
BCP: BulkCopy utility to import and export flat files with SQL Server


The following tools are available for MS-DOS:


ISQL: Utility to issue SQL queries
BCP: BulkCopy utility to import and export flat files with SQL Server
Note: The BCP utility is an MS-DOS-based utility for all client
utility versions.







NOTE: You can use the SQL Administrator and SQL Object Manager client tools
installed with SQL Server 4.2x on 32-bit and 16-bit clients. For 32-bit clients,
I recommend using the new 32-bit tools, such as the SQL Server Enterprise Manager,
rather than the SQL Server 4.2x tools. But the 4.2x SQL Object Manager does provide
graphical BCP capabilities. To use SQL Administrator and SQL Object Manager, you
must install the following scripts on the version 6.5 SQL Server, located on the
SQL Server root directory \INSTALL:






ADMIN60.SQL for the SQL Server Administrator
OBJECT60.SQL for the Object Manager






Before you can administer a SQL Server 6.0 installation with a SQL Server 6.5
Enterprise Manager, you must install the following script on the version 6.0 SQL
Server:






SQLOLE65.SQL for the SQL Server 6.5 Enterprise Manager to attach to
a SQL Server 6.0 installation













The following sections walk through a SQL Server client utilities installation from
Windows 95.
Step 1: Run Setup
Installing SQL Server utilities on 32-bit operating systems requires running the
setup program located on the SQL Server 6.5 CD-ROM. The CD-ROM contains several directories,
including directories for each of the currently supported microprocessors:


\I386 for Intel machines
\ALPHA for Digital Alpha AXP machines
\PPC for PowerPC machines
\MIPS for MIPS processors







For 16-bit operating systems (Windows 3.1 and Windows 3.11), run setup from the correct
processor directory under the directory \CLIENTS\WIN16. For MS-DOS, use
the directory \CLIENTS\MSDOS.





Select the correct directory for the processor you are using and run the setup
program. The SQL Server Welcome dialog box appears (see Figure 6.23). To install
the client utilities, click the Continue button.
Figure 6.23.
The SQL Server Welcome dialog box.
Step 2: Install Client Utilities
The next dialog box that appears is Install/Remove Client Utilities (see Figure
6.24). To continue the installation, select the Install Client Utilities option and
click the Continue button.
Figure 6.24.
The Install/Remove Client Utilities dialog box.





NOTE: To remove client utilities, select the Remove Client Utilities and Files
option and then click the Continue button.





Step 3: Select Utilities
The Install Client Utilities dialog box appears (see Figure 6.25). Use the Drive
combo box to select the correct drive; enter a directory in the Directory text box
(the default directory is \MSSQL). All the utilities checkboxes are
selected in the Utilities To Be Installed area. If you do not want a utility installed,
deselect the appropriate checkbox. When you have made all your utility selections,
click the Continue button.
Figure 6.25.
The Install Client Utilities dialog box.

The utilities begin to load on your computer. When the utilities are loaded, a completion
dialog box appears and the client utility installation is complete. Reboot the computer
and you are ready to test the utilities. Figure 6.26 shows the Windows 95 program
group created by the utilities setup program. The SQL Server utilities installation
is complete.
Figure 6.26.
The Windows 95 SQL Server 6.5 Utilities program group.
Configuring Clients
Now that you have the client utilities installed, you are ready to connect to
SQL Server. SQL Server clients establish connections with SQL Server over named-pipes
using dynamic server names. SQL Server clients can connect over named-pipes or any
of the Microsoft-supplied protocols, including TCP/IP sockets and IPX/SPX.
Typically, you can connect to SQL Server from a client utility without any special
configuration. When using ISQL/W or the Enterprise Manager, click the List Servers
button to get a list of the active SQL Servers.
To connect to a SQL Server that is using a different network protocol or listening
on an alternate named-pipe, you can set up an entry for the SQL Server using the
Advanced page of the Client Configuration Utility dialog box (see Figure 6.27).
Figure 6.27.
The Advanced page of the SQL Server Client Configuration Utility dialog box.





TIP: If you are trying to connect to SQL Server on a local machine, leave
the server name blank.





To add a new client configuration, select a server or enter the server name in
the Server combo box. Select the network used to communicate with the server in the
DLL Name list box. The DLL name refers to the network library that provides the communication
between SQL Server and the client. Selecting the network assigns the correct DLL
to the server entry. The network DLLs for each operating system are listed in Table
6.1. Table 6.1. SQL Server net libraries.





Windows NT DLL
Windows 3.1 and 3.11 DLL
Network ProtocolMS-DOS TSR


Named-Pipes
DBNMPNTW
DBNMP3
DBNMPIPE.EXE


NWLink IPX/SPX
DBMSSPXN
DBMSSPX3
DBMSSPX.EXE


Banyan Vines
DBMSVINN
DBMSVIN3
DBMSVINE.EXE


TCP/IP Sockets
DBMSSOCN
DBMSSOC3
None


Multi-Protocol
DBMSRPCN
DBMSRPC3
None




Add the proper connection string information in the Connection String text box. For
example, if the network is TCP/IP and the address of the server is 200.12.20.123
and the SQL Server port is 1433, add the following in the Connection String
box:
200.12.20.123,1433
Click the Add/Modify button in the Client Configuration Utility dialog box. The
server name is now available for the SQL Server client utilities.





What about ODBC?
If you are trying to connect to SQL Server using the Open Database Connectivity standard
(ODBC), remember that the Client Configuration Utility does not set up ODBC data
sources for applications such as Microsoft Access or Powerbuilder. You must run the
ODBC setup program that ships with the application or the operating system. See Chapter 12, "Replication," for examples of configuring
ODBC sources.





Troubleshooting Installation and Upgrade
As stated earlier, the installation and upgrade process for SQL Server is fairly
straightforward; however, even in the most straightforward operations, problems can
and do occur. Hopefully, you will be provided with error messages that pinpoint your
problem. In some cases, you will have to do some debugging and observation to determine
what has gone wrong. In the worst case, you may find yourself on the telephone with
tech support trying to determine the problem.
Some of the common errors encountered during an installation or upgrade are improper
Windows NT permissions or insufficient disk space. If you receive an error message
telling you that you can't create a directory or file, you probably have a permissions
problem. Switch to an account with the correct permissions. If the installation fails,
check your disk space to make sure that you have enough free space to install SQL
Server.
Typical problems encountered during an upgrade--other than problems with disk
space and permissions--are trying to upgrade a suspect (corrupted) database or a
database with a read-only flag set. Use the CHKUPG utility and make sure that you
resolve any suspect database problems and reset the read-only database options to
FALSE before upgrading.
What can you do if you have completed an installation or upgrade and your SQL
Server does not work? You have to start debugging and try to determine the problem.
The best place to start is the SQL Server error log.
Error Log and Windows NT Application Log
The error log, located on the SQL Server root directory in the directory \LOG,
is a text file used to log audit and error information for SQL Server.
The Windows NT application log is a Windows NT system log used by applications
and Windows NT to log audit and error information. The Windows NT application log
contains the same information as the SQL Server error log, except that only SQL Server
writes to the error log but any Windows NT application can write to the application
log. You can configure SQL Server to write to both logs (the default) or to either
log.





TIP: When I try to read consecutive error or audit messages, I find that the
SQL Server error log is easier to view than the Windows NT application log; however,
one benefit of the Windows NT application log is that error messages are highlighted
with a stop-sign icon and are easy to find.





Following is an example of a SQL Server error log entry during system startup:
96/04/29 07:39:12.97 kernel Microsoft SQL Server 6.50
- 6.50.201 (Intel X86)
Apr 3 1996 02:55:53
Copyright (c) 1988-1996 Microsoft Corporation
96/04/29 07:39:13.06 kernel Copyright (C) 1988-1994 Microsoft Corporation.
96/04/29 07:39:13.07 kernel All rights reserved.
96/04/29 07:39:13.07 kernel Logging SQL Server messages in file `C:\MSSQL\LOG\ERRORLOG'
96/04/29 07:39:13.14 kernel initconfig: number of user connections limited to 15
96/04/29 07:39:13.15 kernel SQL Server is starting at priority class `normal' with
dataserver serialization turned on (1 CPU detected).
96/04/29 07:39:13.31 kernel Attempting to initialize Distributed Transaction Coordinator
96/04/29 07:39:13.71 server Failed to obtain TransactionDispenserInterface: XACT_E_TMNOTAVAILABLE
96/04/29 07:39:13.79 kernel initializing virtual device 0, C:\MSSQL\DATA\MASTER.DAT
96/04/29 07:39:13.82 kernel Opening Master Database ...
96/04/29 07:39:14.02 spid1 Loading SQL Server's default sort order and character
set
96/04/29 07:39:14.13 spid1 Recovering Database `master'
96/04/29 07:39:14.19 spid1 Recovery dbid 1 ckpt (7953,34) oldest tran=(7953,0)
96/04/29 07:39:14.39 spid1 Activating disk `MSDBData'
96/04/29 07:39:14.40 kernel initializing virtual device 127, C:\MSSQL\DATA\MSDB.DAT
96/04/29 07:39:14.40 spid1 Activating disk `MSDBLog'
96/04/29 07:39:14.41 kernel initializing virtual device 126, C:\MSSQL\DATA\MSDBLOG.DAT
96/04/29 07:39:14.42 spid1 Activating disk `mypubs'
96/04/29 07:39:14.43 kernel initializing virtual device 2, C:\MSSQL\DATA\mypubs.DAT
96/04/29 07:39:14.43 spid1 Activating disk `repdata'
96/04/29 07:39:14.44 kernel initializing virtual device 3, C:\MSSQL\DATA\repdata.DAT
96/04/29 07:39:14.45 spid1 Activating disk `replog'
96/04/29 07:39:14.46 kernel initializing virtual device 4, C:\MSSQL\DATA\replog.DAT
96/04/29 07:39:14.47 spid1 Activating disk `sales_data2'
96/04/29 07:39:14.48 kernel initializing virtual device 7, C:\MSSQL\DATA\sales_data2.DAT
96/04/29 07:39:14.48 spid1 Activating disk `Sales_Datat'
96/04/29 07:39:14.49 kernel initializing virtual device 5, C:\MSSQL\DATA\Sales_Datat.DAT
96/04/29 07:39:14.50 spid1 Activating disk `sales_log'
96/04/29 07:39:14.51 kernel initializing virtual device 6, C:\MSSQL\DATA\sales_log.DAT
96/04/29 07:39:14.51 spid1 Activating disk `test_data'
96/04/29 07:39:14.52 kernel initializing virtual device 1, C:\MSSQL\DATA\test_data.DAT
96/04/29 07:39:14.56 spid1 server name is `KSCSNT'
96/04/29 07:39:14.63 spid1 Recovering database `model'
96/04/29 07:39:14.68 spid1 Recovery dbid 3 ckpt (338,0) oldest tran=(339,0)
96/04/29 07:39:14.94 spid1 Clearing temp db
96/04/29 07:39:16.73 kernel Read Ahead Manager started.
96/04/29 07:39:16.80 kernel Using `SQLEVN60.DLL' version `6.00.000'.
96/04/29 07:39:16.99 kernel Using `OPENDS60.DLL' version `6.00.01.02'.
96/04/29 07:39:17.03 kernel Using `NTWDBLIB.DLL' version `6.50.201'.
96/04/29 07:39:17.08 ods Using `SSNMPN60.DLL' version `6.5.0.0' to listen on `\\.\pipe\sql\query'.
96/04/29 07:39:19.01 spid10 Recovering database `pubs'
96/04/29 07:39:19.03 spid10 Recovery dbid 4 ckpt (865,2) oldest tran=(865,0)
96/04/29 07:39:19.05 spid11 Recovering database `msdb'
96/04/29 07:39:19.06 spid12 Recovering database `products'
96/04/29 07:39:19.10 spid11 Recovery dbid 5 ckpt (3594,11) oldest tran=(3594,0)
96/04/29 07:39:19.21 spid12 Recovery dbid 6 ckpt (338,10) oldest tran=(338,0)
96/04/29 07:39:19.68 spid12 6 transactions rolled forward in dbid 6.
96/04/29 07:39:19.80 spid11 Recovering database `MyPubs'
96/04/29 07:39:19.85 spid11 Recovery dbid 7 ckpt (801,15) oldest tran=(801,0)
96/04/29 07:39:19.88 spid10 Recovering database `distribution'
96/04/29 07:39:20.03 spid10 Recovery dbid 8 ckpt (5505,1) oldest tran=(5505,0)
96/04/29 07:39:20.18 spid12 Recovering database `Sales'
96/04/29 07:39:20.22 spid12 Recovery dbid 9 ckpt (1029,9) oldest tran=(1029,8)
96/04/29 07:39:20.29 spid12 1 transactions rolled forward in dbid 9.
96/04/29 07:39:20.40 spid10 10 transactions rolled forward in dbid 8.
96/04/29 07:39:20.62 spid1 Recovery complete.
96/04/29 07:39:20.65 spid1 SQL Server's default sort order is:
96/04/29 07:39:20.65 spid1 `nocase' (ID = 52)
96/04/29 07:39:20.65 spid1 on top of default character set:
96/04/29 07:39:20.66 spid1 `iso_1' (ID = 1)
96/04/29 07:39:20.84 spid1 Launched startup procedure `sp_sqlregister'
96/04/30 10:34:09.84 kernel SQL Server terminating due to `stop' request from Service
Control Manager
You can view the error log using any text file editor, such as Windows Notepad
or SQL Server Enterprise Manager. You can view the Windows NT application log using
the Windows NT Event Viewer (see Figure 6.28).
Figure 6.28.
The Windows NT application log.

Scan through the error log or application log and look for possible error messages.
Every time you stop and restart SQL Server, a new error log is started. SQL Server
archives the error logs by saving the previous six error log files, named as follows
(where X is 1 through 6, and the current error log is ERRORLOG):
ERRORLOG.X
Another possible place to find error messages is the \INSTALL directory
on the SQL Server root directory. Each installation script file writes to an output
file with an OUT extension. To find the last script that was executed, enter
the following on a DOS command line from the \INSTALL directory:
dir *.out /od
The last file displayed is the last script to execute. Check the OUT
file for possible errors.
Start SQL Server from the Command Line
If you are having trouble starting SQL Server from the Windows NT Service Manager
or the SQL Server Service Manager after an installation or upgrade, try starting
SQL Server from the command line. Starting SQL Server from the command line is a
great way to debug because the messages usually logged to the error log or Windows
NT application log are displayed directly in the DOS command window. To start SQL
Server from the command line, enter the following:
sqlservr <command line options>
Not all the command-line options are discussed here, but read on to find out about
a few of the important options you can use to help get your SQL Server debugged and
up and running. -d The -d option specifies the path and filename
of the master device. -c The -c option starts SQL Server
independent of the Windows NT Service Control Manager.





TIP: The -c option is supposed to quicken SQL Server startup time
by bypassing the Windows NT Service Control Manager. If you are having problems starting
SQL Server, include the -c option to help further isolate the problem. I
was working with one upgraded SQL Server installation in which the NT Service Control
Manager kept shutting down SQL Server every time it started. By specifying the -c
option, we were able to get the server up and running and correct the problem. The
only drawback is that you cannot stop the SQL Server with any of the conventional
methods (such as the SQL Server Service Manager). SQL Server can be halted by logging
off of Windows NT or pressing Ctrl+C in the DOS command window running SQL Server.
When you press Ctrl+C, you are prompted with a message asking if you want to shut
down the server. Select Y to shut down the server.





-m The -m option enables you to start SQL Server in single-user
mode, which means that only one user can log into SQL Server. Use the -m
option when restoring databases or trying to fix suspect or corrupted databases.
-f You decide to push the limits of your system's capabilities and you place
tempdb in RAM, not really understanding where the RAM is coming from for
the temporary database. You restart SQL Server and you get an error trying to open
the tempdb database because you don't have enough physical or virtual memory
on your machine to create tempdb in RAM and run SQL Server. Does this problem
sound familiar? How do you correct this problem? Use the -f startup option.
The -f option enables you to start SQL Server in a minimal configuration.
Use the -f option only when SQL Server does not start because of a configuration
parameter problem, such as placing a 40M tempdb in RAM when only 20M of
RAM is available.
Following is an example of how to start SQL Server from the command line using
some of the preceding options:
sqlservr -c -dc:\sql\data\master.dat -f





SQL Server Installation Checklist
Check off the following items as you complete or verify them:


Hardware and PC Setup




Computer is Alpha AXP, MIPS, PowerPC, or Intel (32-bit x86) and is on the Windows
NT Hardware Compatibility list
Memory: 16M for nondistribution server, 32M for distribution server
Operating System: Windows NT 3.51 or greater
Free Disk Space >= 96M on the hard drive to which SQL Server is to be installed
File System:
FAT
NTFS




NT Server Name


SQL Server Options (Check or fill in)
User Name:___________
Company Name:___________
Product ID:___________
SQL Server Root Directory:___________
Master Device Location and Filename: ___________
Master Device Size (Min: 25M): ___________


Selected Character Set




ISO 8859-1 (Default)
Code Page 850 (Multilingual)
Code Page 437 (US English)
Other _____________
Selected Sort Order:________




Network Protocols:




Named-Pipes (Default)
Multi-Protocol
NWLink IPX/SPX
TCP/IP Sockets
Banyan Vines
AppleTalk ADSP
DECnet Books Online Installed:




Yes
No (Requires an additional 1M to 15M)




Auto-Start Options:




SQL Server
SQL Executive


Licensing Mode:__________


Windows NT User Accounts:


MS SQL Server User Account: __________
(Required for SQL Server network access for features such as ODBC replication or
Web page generation)
SQL Executive User Account: __________





Summary
You now have completed the chapters on installing and upgrading SQL Server. The
remaining chapters in this book teach you how to perform database administration
tasks such as database backups, SQL Server tuning and configuration, and many other
activities.






DISCLAIMER



To order books from QUE, call us at 800-716-0044
or 317-361-5400.

For comments or technical support for our books and software, select Talk to Us.

© 1997, QUE Corporation, an imprint of Macmillan Publishing USA, a Simon and Schuster
Company.
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • teen-mushing.xlx.pl
  • Wątki
    Powered by wordpress | Theme: simpletex | © Lemur zaprasza