OVERVIEW:
Hach WIMS comes with two tutorial databases. One with examples for Drinking Water Plants and Distribution Systems (OPSDWTUTOR.MDF) and one with Wastewater Treatment Plant (OPSWWTUTOR.MDF) examples. This article will take you through attaching the databases to your MS SQL 2005 Server.
APPLIES TO:
PROCEDURE:
-
Download the tutorial databases from
here. Put the files in your MS SQL Server Data Folder.
-
Extract your files to your MS SQL Server data folder. Typically, this is your <Program Files>\Microsoft SQL Server\MSSQL.1\MSSQL\ folder on your database server.
Now we need to attach the OPSWWTUTOR.mdf using SQL Server Management Studio. You will need to login to the Management Studio with DBA priviledges. Right Click on Databases and click Attach:
6. Click Add and pick the OPSWWTUTOR.mdf file and click OK:
7. Remove the OPSWWTUTOR_log.LDF (this is the transaction log) since it is not included in the Zip. MS SQL Server will automatically create a new transaction log. Click OK and the database will be attached.
8. You must set the DB Owner to OPSDBA in order for the OPS SQL client to log into the database. Click on the OPSWWTUTOR database, click the New Query button and Execute the following statement:
sp_changedbowner 'OPSDBA'
9. You must now make an entry in the OPSROOT.FACILITY table that the OPSWWTUTOR database is available. Right Click on the FACILITY table and go to Open Table and create a record as follows:
10. You can now log into the tutorial database. You will need to use System Setup, User Setup to allow users access to the database.
NOTE: You may be prompted to upgrade the database when you log into it for the first time. This is normal and simply proceed with the database upgrade by following the prompts on the screen.