Home : Attach MS SQL 2005 Tutorial Databases
Q10763 - HOWTO: Attach MS SQL 2005 Tutorial Databases

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:

  • Hach WIMS Professional or Enterprise Edition. 
    NOTE: If you have Hach WIMS Standard or Single User the tutorial databases are automatically attached to Hach WIMS database during install.
  • MS SQL 2005

PROCEDURE:

  1. Download the tutorial databases from here.  Put the files in your MS SQL Server Data Folder.
  2. 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.

 

 

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 2/14/2008 9:57 AM.
Last Modified on 8/9/2024 10:57 AM.
Last Modified by Ryan Rhoten.
Article has been viewed 6709 times.
Rated 6 out of 10 based on 2 votes.
Print Article
Email Article