Installing ACME Database on Microsoft SQL Server 2000 Using OSQL Utility

Installing ACME Database on Microsoft SQL Server 2000 Using OSQL Utility

Following are instructions on how to install ACME sample database on MS SQL Server 2000 using OSQL utility (explained in Appendix E).

  1. If your MS SQL Server services are not running, start them as described in Appendix D.

  2. Copy the D:\sqlbib\mssql_acme (where D is the letter of your CD-ROM drive) directory from the CD-ROM that comes with your book to the C:\ directory of your computer.

  3. Issue the following commands:

    osql /U sa
    			 /P sa /IC:\sqlbib\mssql_acme\create_acme_mssql.sql
    			 /oC:\sqlbib\mssql_acme\create_acme_mssql.log osql /U sa /P sa

    Each of these is actually one command, although the physical dimensions of the printed book dictate that they be presented in this way.

This example assumes that during the MS SQL Server installation you specified password 'sa' for user sa (see Appendix D). If a different password and user ID were specified, replace values accordingly. After execution, a log file is created in the specified directory (in this case C:\sqlbib\mssql_acme).

Some common errors from running MS SQL Server scripts are shown in Table F-3.

Table F-3: Common Errors from Running MS SQL Server Scripts




Login failed for user 'sa'.

You specified an incorrect password for user sa.

Specify the correct password or change it using the MS SQL Server Enterprise Manager.

[Shared Memory]SQL Server does not exist or access denied.

MS SQL Server is not running.

Start MS SQL Server (see Appendix D).

Procedure sp_grantdbaccess, Line 126 User or role 'acme' already exists in the current database. .

Script is trying to create user acme that already exists.

No action required, FYI only