The installation of SQL Server is relatively simple and similar to the installation of other Microsoft products. In this appendix, you'll receive information about the different steps and considerations to keep in mind as you set up your server system. Here's an example of the topics that will be covered:
![]() The information in this appendix comes from Que Publishing's "Special Edition, Using SQL Server" that contains complete coverage of SQL Server, replication, administration and the SQL language. ![]() |
Also according to the documentation, you must have a minimum of 16M of RAM, although additional memory is recommended for x86-based systems. A minimum of 16M is suggested for a Windows NT Server system, but 32M is more appropriate. Most RISC-based systems are usually configured with a minimum of 64M and often are configured with 128M of memory.
![]() These stated minimums are just that: minimums. As you bring up systems, there are a number of factors that will impact these numbers. Be sure to pay special attention to any Replication tasks you may wish to run, and to the number of client systems that you'll be allowing to access the server during peak periods. One of the biggest performance boosts you can offer in the SQL Server world is the addition of memory. This simple enhancement can improve performance by two-fold or more in many cases. These recommendations aren't unreasonable for a server system. Don't forget how inexpensive memory has become in recent years. In 1977, approximately 250k of memory for at least one manufacturer's system was priced at $17,000. In recent years, you can buy 1M of memory for less than $50.
Although you may be using an Intel x86-based processor in your server system, its processing power and speed far exceeds the large minicomputer systems of 10 to 15 years ago. Don't be deceived by the physical difference in size with your system vs. a mainframe. |
You need to have at least 70M of disk space to complete the installation, and if you install the books on-line feature of SQL Server, you'll need to add 15M to this requirement. However, if you have only 70M, you don't have any space to create additional logical devices on which to create your databases. You should count on a minimal SQL Server installation requiring approximately 150M to start.
Note that, although you can create your database tables and other objects within the master database, you shouldn't. Try to keep your core objects, those installed when you first bring up SQL Server, on a common logical device. As you'll see later, when you create additional devices, databases and tables, you can designate different storage devices for those, if your primary location does not have the disk space available. You also need a floppy-disk drive for 3 1/2-inch, high-density disks or a CD-ROM drive to read the installation media.
Load the SQL Server software from your installation media onto a Microsoft Windows NT workstation or Windows NT Server system. You don't need any additional network software because the Windows NT system contains built-in network software. You need a network interface card (NIC) that's supported by Windows NT. If you'll access SQL Server directly only from the server system, without using a network for access, you don't need a NIC.
You can install SQL Server on a partition that uses either the FAT or NTFS file systems. You'll probably want to take advantage of the recovery and security features of a NTFS disk partition rather than the older and simpler FAT disk system, although your installation may have other considerations for other installed software that dictate this installation parameter.
To perform the installation, follow these steps:
Fig. 6.1 - You can change a characteristic such as the security mode only by running SQL Setup.
Fig. 6.2 - Client licensing permits you to buy the exact number of client connections that you need.
Fig. 6.3 - You can share the on-line documentation from the server, saving disk space on the client systems. You can also install copies on client systems.
Fig. 6.4 - Select Auto Start SQL Server at Boot Time to automatically start SQL Server, and Auto Start SQL Executive at Boot Time to automatically start SQL Server when the Windows NT server system is booted.
![]() If you use an administrator's account and password for the NT Executive configuration, and later change the password for that account, be sure to return to the Services applet in the Control Panel to update the information for NT Executive's logon. If you don't, the service will be unable to start and will not perform as needed. ![]() |
![]() If you later must change your character set or sort order, you'll have to rebuild the master database. ![]() |
![]() If you have the desktop version of Microsoft SQL Server, you can't select alternate Net-Libraries; only Named Pipes may be installed. ![]() |
Fig. 6.5 - You should enter a password for the SQL Executive Service account that contains at least eight characters.
It's a good idea to use a separate NT account for this service rather than share the NT Administrator account. If you later change the NT Administrator account without realizing it's being used by SQL Executive Service, SQL Server may not work correctly.
If you successfully install SQL Server from a CD, you won't see any more dialog boxes. If you install SQL Server from floppy disks, you'll be prompted to change disks. When the installation is completed successfully, click Reboot if you want to begin using SQL Server.
![]() Remember to manually start the SQL Server services after you reboot if you haven't defined automatic SQL Server startup. ![]() |
If you don't define SQL Server processes to automatically start up, you can later change it to automatic by using the Control Panel's Services option.
Fig. 6.6 - Set up SQL Server to log on with a specific user account..
![]() It's very important that you consider your future uses for SQL Server as you install it concerning user identities for the SQL processes. If you're using, or will be using in the future, the email capabilities of SQL Server, and the post office resides on a Novell server, you won't be able to access the mail system unless you establish a separate account for SQL Server. ![]() |
If you leave the SQL Server Service Manager running, you can easily Stop or Pause SQL Server as needed.
sqlservr /d drive:\directory\data\master.dat
Use /d to specify the name of the SQL Server master database.
The drive is the drive letter you entered in the Drive text box of the SQL Server Installation Path dialog box (refer back to fig.). The directory is the directory you entered in the Directory text box of the same dialog box. The default for the directory is SQL and the default for the drive is C.
Master.dat is the name of the data file that is the SQL Server master device. The master database is located on the master device and contains the set of system tables that defines SQL Server. Master.dat is located in the subdirectory data of the SQL directory.
![]() The sqlservr command line actually starts two system processes, both of which can have multiple threads. ![]() |
For the 16bit Windows clients, the following utilities are installed:
For the 32bit client, the following utilities are installed:
Here are the steps to installing the software:
![]() To avoid conflicts with system files, you should exit all other software applications prior to running the setup program. If you don't, you may receive an error message as the files are copied to your system. This error message will prevent you from completing the installation successfully. Pay special attention to less-obvious applications such as the Office toolbar or other applications that run in the background. When in doubt, use the Windows task manager to verify the processes that are active on your system. ![]() |
It's a good idea to remove prior versions of the utilities before you install the newer 6.5 versions on your system if you're upgrading your client software. If you do uninstall your old utilities, you'll need to restart the setup process to continue with the installation of the new utilities.
![]() If you receive a file copy error during the installation process, you'll need to close other applications that may be running. Of special interest is the Microsoft Office suite of applications including the toolbar for Office and Microsoft Exchange. These can all cause installation errors when the SQL Server setup program attempts to install updated DLLs to the system directories. ![]() |
Once completed, you'll be able to use the client workstation to administer, inquire into and manage the different aspects of your SQL Server system.
The first step is to select the Clients subdirectory from the CD containing SQL Server. Select your operating system, either DOS or Win16 for the 16bit Windows client software. If you're running the Windows setup, select and run the SETUP program, installation of the DOS client software simply requires copying the files to a directory of your choice.
The Windows setup program will prompt you for the destination of the files and will then ask you to confirm which utilities you want to install.
When you select Install, the utilities will be copied to your system. A program group will be created and you'll be ready to start using the utilities with your system.
sp_helpsql ['topic']
Although the topic is optional (as indicated by the square brackets, which you shouldn't type as part of the procedure line), enclose it in single quotation marks to return information on the specified topic. If you use sql_helpsql without a topic, it returns help on the use of the help procedure.
You can use sp_helpsql to return information about data definition commands that create database objects. In the following example, the sp_helpsql procedure returns information about the CREATE TABLE statement.
sp_helpsql 'create table'
helptext
-----------------------------
CREATE TABLE
Creates a table.
CREATE TABLE [[<database.>]<owner.>]
<table_name>
(<column_name> <datatype> [NOT NULL | NULL]
[, <column_name> <datatype>
[NOT NULL | NULL]]...)
[ON <segment_name>]
![]() The information about using the CREATE TABLE command and other information returned with the system-stored procedure is returned in tabular format with a column header. This is because it's retrieved from a system table within SQL Server. The sp_helpsql system procedure uses a Select statement to retrieve help information. ![]() |
The following example displays help for using a system-stored procedure. The help returned includes a description of the procedure's function and syntax. Help on stored procedures is quite useful because you pass information to a procedure such as sp_bindrule as parameters.
sp_helpsql sp_bindrule
helptext
-----------------------------
sp_bindrule
Binds a rule to a column or user datatype.
sp_bindrule <rule_name>, <objname> [, FUTUREONLY]
![]() Items enclosed in angle brackets "<" and ">" are parameters that you must provide with the command. Items within square brackets, "[" and "]", are optional. ![]() |
To run a stored procedure, enter the name of the stored procedure, a space, and then any applicable parameters. Each parameter should be separated by commas. When you can't remember the procedure syntax, use sp_helpsql to show the order and information required for each parameter of a function.
If you return help about the functions topic, you'll see general information about functions as well as a list of the function groups for which information is available. For example, you can issue the statement shown in the following example to find out more about FUNCTIONS supported by SQL Server.
sp_helpsql functions
The keyword FUNCTIONS returns special information from the database. Functions are used in Select statements and are divided into aggregate, date, mathematical, string, system, text/image, and type-conversion functions. Each group is described separately within the on-line help. Help is available for the following function groups:
AGGREGATE DATE MATH STRING SYSTEM
TEXT CONVERSION
If you don't already know the name of a specific function for which you want help, you must first enter the name of one of the function groups as the parameter to the SP_HELPSQL statement. For example, the command sp_helpsql 'date functions' shows a list of the functions for which help is available.
The sp_helpsql help function doesn't accept subtopics and topics. You can't enter a topic such as the name of a function group and the function name to obtain help on a specific function. Enter the name of a function as a topic after you find its name. In the following example, information is returned about the getdate function after its name is found with the separate command sp_helpsql 'date functions':
sp_helpsql 'getdate'
helptext
-----------------------------
GETDATE
GETDATE returns the current date and time in SQL Server's standard internal format for date/time values. GETDATE takes the NULL parameter ().
You can also enter fragments of keywords used to form Transact-SQL statements as part of the SP_HELPSQL statement. You can use a keyword fragment to obtain help when you don't know an entire command or when you're unsure of the keyword spelling. In the following example, cre is entered to return information on create statements or any other Transact-SQL keywords that begin with cre:
sp_helpsql 'cre'
In the preceding example, you've entered a non-unique topic. You can obtain more information for the following topics:
command
------------------------------
create rule
create view
create index
create table
create default
create trigger
create database
create procedure
The last example of an sp_helpsql command shows information that you may want to view when you create a table. Help on the datatype topic returns information about all Transact-SQL datatypes, including a brief description of data the datatype can store and the range of values.
sp_helpsql 'datatype'
helptext
-----------------------------
Datatype Definition
Binary(n) Fixed-length binary data.
Maximum length=255 bytes.
Bit A column that holds either
0 or 1.
Char(n) Character data.
Maximum length=255 bytes.
Datetime Dates and times with accuracy
to milliseconds.
Float Floating-point numbers.
Image Large amounts of binary data
(up to 2,147,483,647
characters.)
Int Integers between
2,147,483,647 and
-2,147,483,648.
Money Dollar and cent values.
Real Floating point numbers with
7-digit precision.
Smalldatetime Dates and times with
accuracy to the minute.
Smallint Integers between 32,767
and -32,768.
Smallmoney Monetary values between
214,748.3647 and
-214,748.3648.
Text Large amounts of character
data (up to
2,147,483,647 characters.)
Timestamp Automatically updated when you
insert or update a row that
has a timestamp
column, or use BROWSE mode in a
DB-LIBRARY application.
Tinyint Whole integers between 0
and 255.
Varbinary(n) Variable-length binary data.
Max length=255 bytes.
Varchar(n) Variable-length character data.
Max length=255 bytes.
Copyright ©1996, Que Corporation. All rights reserved. No part of this book may be used or reproduced in any form or by any means, or stored in a database or retrieval system without prior written permission of the publisher except in the case of brief quotations embodied in critical articles and reviews. Making copies of any part of this book for any purpose other than your own personal use is a violation of United States copyright laws. For information, address Que Corporation, 201 West 103rd Street, Indianapolis, IN 46290.Notice: This material is from BackOffice Intranet Kit, ISBN: 0-7897-0848-5. The electronic version of this material has not been through the final proof reading stage that the book goes through before being published in printed form. Some errors may exist here that are corrected before the book is published. This material is provided "as is" without any warranty of any kind.