SQL*Server Database Setup

If you are not using a SQL*Server Database, then you must do the Oracle Database Setup or go back to Installation Table of Contents.

If you have not installed Microsoft SQL*Server, you will need to do that first. See the installation documentation included with SQL*Server.

Once SQL*Server is up and running, you will need to do the following steps:

  1. Create Database Devices (database and log).

  2. Create Database.

  3. Run SQL Scripts.

Create Database Devices

Prior to setting up the Database Devices, you will need to (1) identify the name of the machine hosting the database and (2) determine the size of both your database and log file. Your DBA can provide this information. For the following sample instructions, we will build a 500 Meg database and a 25 Meg log file. The specific size of your devices should be substituted in the example that follows.

To create these devices, open up Microsoft SQL Enterprise Manager. A list of Microsoft SQL*Server names should appear in the Server Manager window in a tree structure. If you do not see your server name, you will have to Register the server (do this by clicking on Server in the menu, and then press Register Server, and enter all the information - your DBA should be able to help you with this).

If the server is registered correctly, you will see your server name next to a traffic light symbol. If the server is not running (red light), then go ahead and start the server by right clicking on the server name and select Start. This should give you a green light. If not, then contact your system administrator or SQL*Server support.

With the server up and running, click on the plus symbol next to your server name to expand the menu. You should see a folder called Database Devices. This is where you will create the physical file names to be stored on the database server for the Unanet database. Since we are going to create two devices (database and log), we will append "db" and "log" at the end of both our device names respectively.

Create both devices as detailed below, replacing the size fields with the values determined by your DBA:

Creating Database Device Example

1. Right click on Database Devices.
2. Select New Device.
3. Enter the drive and directory.
4. Enter the name unanet_db in the name field.
5. Set the Size(MB) to 500 (enter your size value).
6. Press the Create Now button.

Create Log Device Example

1. Right click on Database Devices.
2. Select New Device.
3. Enter the drive and directory.
4. Enter the name unanet_log in the name field.
5. Set the Size(MB) to 25 (enter your size value).
6. Press the Create Now button.

You have now established two files on the database server in the specified directory. Please note: If you need to delete a device: first, delete that device using SQL*Server (right click on the device name and select Delete). After you remove the device name from the Tree List, then go delete the actual file using your operating system. SQL*Server does not physically remove the file from your server.

Create Database

These instructions assume you created your database devices as two separate files called unanet_db and unanet_log as explained in the Create Database Devices section of this installation guide.

With the server up and running, expand the menu next to your server name if it is not already. You should see a folder called Databases. Right click on that folder and select New Database.

To create the Unanet database (1) enter unanet (no caps) in the Name Field, (2) select unanet_db from the drop down list in the Data Device Field, and (3) select unanet_log from the drop down list in the Log Device Field. The size in Megabytes should appear next to each device that you created previously. No need to change them. Press the Create Now button. Depending on the size of the devices, this could take a few minutes. Once the database is created, you should see it in the list of databases in the SQL*Server Tree List.

Run SQL Scripts

These instructions assume you have created the database and called it unanet as explained in the Create Database section of this installation guide. The database scripts are located in the Unanet Home Directory in a directory called database\sqlserver. The default location of the scripts is: C:\Unanet\database\sqlserver.

From SQL Enterprise Manager, within the Server Manager window, click on the unanet database to highlight that database. Next, go to the menu across the top of the screen and click on Tools. Select SQL Query Tool.

Once you are in the Query window, double check that the database you are about to run this against is the unanet database (should be displayed in the drop down list box). If not, then change to the unanet database. This is very important. We don't want to run these scripts in any other database.

Once you are sure we are using the unanet database, make sure the Query tab is active and press the open folder icon located in the upper left hand corner of the Query window. Go to the directory that has the Unanet SQL database scripts (C:\Unanet\database\sqlserver) and open the file sqlunanet.sql. Press the green arrow and wait for the script to finish. You will know it is finished when the red square turns off, and the green arrow comes back. It may take a few minutes. When the script is finished you can scroll down the results window and make sure there were no errors during execution.

Next we need to run the permissions script. Press the Query tab and then press the open folder icon again in the Query window. Now, load in the file sqlpermissions.sql. Press the green arrow and wait for the script to finish. (wait for the green arrow to come back on).

That's it for running the two SQL Scripts. Close the Query window and return to the SQL*Server Manager. Close the Microsoft SQL Enterprise Manager application.

Back to Installation Table of Contents


Copyright © 1997, 1998, 1999 Computer Strategies, Inc.

All rights reserved.