Previous Table of Contents Next


Getting Connected

If you have a server you can use, you are best off using the Microsoft ISQL/w client program. You can also use the command line ISQL.EXE, but it’s not very user-friendly. Brief instructions on how to install this program are provided here.

Installing the Client Software

To install this software on a client workstation, you’ll need the MS SQL Server installation CD or the setup files installed on a network drive. There are several directories under the root, corresponding to the different platforms under which MS SQL Server runs. If you have a DEC Alpha workstation (you’re awfully well equipped), run the SETUP under the Alpha directory. Most users will run the i386 setup, for Intel-based computers. Choose the directory based on the type of computer you’ll be using as a client, not the server to which you’ll be connecting.

You’ll see a screen asking what you would like to do. Select Install Utilities Only.

This will install the ISQL/w utility on your computer. It will also install ODBC drivers to access the server. There are a number of options regarding network types (TCP/IP, Named Pipes, Novell’s IPX, and so on) and network addresses for the server machines, for which you may need to get assistance from your database administrator or network administrator.

When the installation is complete, you should be ready to go. You should have a new group called Microsoft SQL Server 6.5 under your Programs group in the Start menu. By default, SQL Server 6.5 installs itself in \MSSQL, and 6.0 installs in \SQL60. The program you’ll be using is stored in \MSSQL\BINN\ISQLW.EXE.

Starting ISQL/w

Start ISQL/w. When it comes up, it will look like Figure 1.1. The Server list will be blank. To get a list of servers on your network that you have set up as ODBC sources, click the List Servers button and then choose the appropriate server.


Figure 1.1.  ISQL/w the first time you log in.

Microsoft SQL Server 6.x has two methods for login security. Integrated security specifies that your Windows 95/NT login is mapped to a username on the SQL Server and that you must use your network ID to log in. You do not specify a new username or login with integrated security. If your site has integrated security (ask your database administrator), click the Use Trusted Connection option button.

Standard security means that you must provide a new, different login and password to gain access to the server. (There is also a Mixed Security mode, which allows you the flexibility to choose either a trusted or standard connection. From the standpoint of this book, it doesn’t matter how you get to the server, as long as you get there.)

Of course, you need to have been given access to the SQL Server before you can log in.

Hopefully, everything went OK and you are now logged in to your server. If everything worked out, you have a new window titled “Query” with a blinking cursor. If your screen looks like Figure 1.2, you’re on your way.


Figure 1.2.  Select the pubs database from the list of databases.

Now, you must change to the sample database that I use throughout this book. Microsoft has written a sample database called pubs that contains information about book publishers, book titles, sales information, employees, authors, and so on. It’s installed by default when the SQL server is installed. To change to this database, select it from the DB list box at the top of the Query window (refer to Figure 1.2).

If you don’t see the pubs database in the list, it might not be installed on your server. To run any of the workshops, you’ll need this database. Ask your database administrator to install it for you. If you have access to the server itself, you can run the INSTPUBS script stored in the \MSSQL\INSTALL directory.


Note:  See Day 9 for more information on SQL scripts. If you must install the database yourself, the following command, run from the command line in \mssql\install, should install the pubs database:
isql -Usa -P<SA Password here> -S<Server name here>
-iinstpubs-opubs.out

If You Have Trouble Starting ISQL/w

The best place to start troubleshooting your problem is in the client configuration utility. This program can be found at /mssql/binn/windbver.exe. Very often, you can fix your problem by changing the default network library. Named Pipes is usually installed as the default library, but Sockets or TCP/IP may also be used by the server.

If you are using TCP/IP, be sure that you have the proper IP port. This information is placed in the server’s log when it starts up. The log can be found at /mssql/log/errorlog. On my server, I have a line in there that reads

Using ‘SSMSSO60.DLL’ version ‘6.5.0.0’ to listen on ‘1433’

This means the SQL Server port is 1433, which is also the installation default. If all else fails, read the manual. The online SQL book has a chapter on troubleshooting installations (Chapter 7 of SQL Server Setup) that is more comprehensive than I could be here.


Previous Table of Contents Next
Используются технологии uCoz