Introduction

Tutorials

Data types and nodes

Reference

Installing GeoData Manager

Managing databases

What is a database ?

In GeoData Manager, a database is a file or a set of files where your geothermal data is stored on a computer's hard disk. The database can be on your computer, or, if you are on a network, the database can be on a server.

When you start GeoData Manager, it asks you to select a database to use. As you work with GeoData Manager, creating, changing and deleting geothermal data, GeoData Manager automatically changes the data in that database accordingly. This means that you never need to tell GeoData Manager to save data to the database, and you will not lose data if it stops unexpectedly.

You can close the current database and open another one. You only ever work with data in the one open database; you can not see data in any closed database.

GeoData Manager comes with a database of typical geophysical data, called sample, for you to experiment with. You could, in principle, continue to use this database for ever, and store all your geothermal data in it. However, you should not do this, but instead you should create and use a separate database for each geothermal field you have. For example, if you have data from Atlantis and data from Valhalla, then create two databases, called Atlantis and Valhalla and store your data for each in each.

This section covers:

Maintaining your databases:

Creating, adding, deleting, removing databases:

You can also:

Note

If you are unsure about databases, ask your IT manager.

Access or SQL Server databases

A GeoData Manager database can be either Microsoft Access or Microsoft SQL Server:

Access databases SQL Server databases
Easier to set up and manage More secure, better behaved and can be bigger
Grow bigger with use, needs compacting occassionally Does not need compacting
Is one file ending in .mdb Is a server and more than one file
Usually managed by a user Usually managed by an IT department
Ideal for a small user, or for quickly setting up a small, ad hoc database Ideal for a large, long-term user

Note

Opening the Database Manager window

Note:

Selecting an existing database to use

  1. Open the Database Manager window.

  2. Click the database to use, then click . Or double-click the database to use.

Note Click the beside and click Select DB (Safe Mode) to start GeoData Manager at the first node in the database tree. Do this, for example, if there is a problem with the database structure and GeoData Manager locked up.


Maintaining your databases

This section covers:

Finding the version number of a database

  1. Open the Database Manager window.

  2. Click Version:

You see the versions down the right. For more on version numbers see here.

Finding where a database is stored on your PC

  1. Open the Database Manager window:

  2. Click the database name and then click Edit DB.

  3. Click the field Use Connection String and press Left arrow or Right arrow to scroll along the connection string until you find the path name that follows Data source=. You can select this path name and press Ctrl + C to copy it:

    • For an Access database, the path name is the database, for example Data Source=C:\Users\stan\AppData\Local\Gradient\GDMan\example\atlantis.mdb

    • For an SQL Server database, the path name is the name of the database server.

  4. Click Cancel.

Backing up a database

Access database

  1. Find where the database is on your PC see above.
  2. Use backup software or Windows Explorer to back up the database to an external disk or to the cloud.

SQL Server database

Use SQL Server Management Studio to backup.

Renaming an existing database

Renaming a database only changes GeoData Manager's name for the database, it does not change the database file name.

  1. Open the database window and click the database to rename.

  2. Click Rename DB. Enter a new name for the database and click OK.

Compacting an Access database

An Access database will slowly grow bigger as you use it, filling up with empty gaps. Occasionally make it smaller again:

SQL server databases You don't haver to compact these.

Copying permissions from an SQL Server database to others

To apply the same permissions to more than one SQL Server database, set up the permissions on one database and use this command to copy the permissions to other SQL Server databases. Use this to:

You need to have GDM Admin or Power User permission to do this.

  1. Start GDM and select a SQL Server database with to copy the permissions from.

  2. In the Database menu, select Database permissions

  3. If required, edit existing permissions in this database or add new permissions - use New, Edit, Rename or Delete.

  4. Then, click Copy to copy these permissions to other SQL Server databases:

    Select the databases to copy these permissions to:

    • select or unselect databases by clicking the checkboxes
    • or click a database name and use Ctrl-Click or Shift-Click to select one or more databases
  5. Click OK to copy the permissions of the current database to all selected databases. GeoData Manager notifies you when it has finished.


Creating, adding, deleting, removing databases


Overview

You can get a database by creating an empty one, or if a colleague sends you one. To use it in GeoData Manager, you first need to add the database to GeoData Manager.

If you don't want to use a database in GeoData Manager any more, remove it from GeoData Manager. Then, if you don't want it any more, delete it.

This section covers:

Creating a new Access database

There are 2 steps to create and install a new Access database:

  1. Create a new, blank Access database.
  2. Build empty GeoData Manager data tables in the new blank database.

In GeoData Manager there are 3 ways to create and install a new Access database:

  1. Use the GeoData Manager database manager command Create and build database (Access only). This does both steps at once to create and install a new Access database see here. This is usually the best way.

  2. Use the GeoData Manager command Create blank database (Access) to create the blank database, then use the GeoData Manager database manager command New DB to build the empty GeoData Manager data tables see here.

  3. Use the Miscrosoft Access application to create the blank database, then use the GeoData Manager database manager command New DB to build the empty GeoData Manager data tables see here.

A - Create a new Access database directly

  1. At the database manager window, click New DB, then click Create and build database (Access only).

    .

  2. Navigate to the folder where you want the database stored. Type a name for the new database. Click Save.

B - Create a new Access database in two steps

  1. Create a new blank Access database:

    • Either use the Miscrosoft Access application to create a blank database and store it in a folder.
    • Or, in GeoData Manager's home window, click Database, then click Create blank database (Access). As above, navigate to the folder where you want the database stored. Type a name for the new database. Click Save.
  2. At the database manager window, click New DB, then click Use a blank DB to build the database.

  3. Follow this procedure.

Then

When you first select the new database in GeoData Manager's Database Manager:

  1. GeoData Manager asks for the mapping parameters for the new database's geothermal field see here

  2. If you have chosen that the database will have user permissions then set these up see here.

Creating a new SQL server database

There are two ways to create a new, empty SQL Server database and install it in GeoData Manager:

  1. From within GeoData Manager see here. This is usually the easiest way.

  2. Using SQL Server Management Studio see here.

A - Creating a new SQL Server database from within GeoData Manager

Requirements: Access to the SQL Server data server.

  1. In Database Manager, Click New DB and select Create and build database (SQL Server)

  2. Wait while GeoData Manager finds your SQL data server, then displays the SQL Server connection:

    1. Enter a server name Select your SQL data server from the dropdown list.

    2. Log on Usually use Windows NT integrated security.

    3. Database name Enter a name using letters or numbers only. No spaces. Ususlly enter the geothermal field name.

    4. Click OK.

  3. GeoData Manager asks if you have the right to create an SQL Server database:

    Click OK if you have the right.

  4. GeoData Manager checks the database name you entered above:

    • If the name has characters other than letters or numbers, GeoData Manager strips them from the name. For example, if you entered Hulu Lais%, GeoData Manager will change this to HuluLais and tell you:

    • If there is already a database with that name, GeoData Manager shows an error and returns for you to enter a new name.

  5. GeoData Manager now asks for a description for the new database. You can enter any characters here. You might type the database name with a space Hulu Lais:

    Click OK.

  6. GeoData Manager creates the new database with empty GeoData Manager tables:

Then

When you first select the new database in GeoData Manager's Database Manager:

  1. GeoData Manager asks for the mapping parameters for the new database's geothermal field see here

  2. If you have chosen that the database will have user permissions then set these up see here.

B - Creating a new SQL Server database using SQL Server Management Studio

Requirements: SQL Server, SQL Server Management Studio

  1. Start SQL Server Management Studio. We recommend you use Windows Authentication:

  2. Click Connect. Right-click Databases and select New Database:

  3. Enter a database name; this should be the name of your geothermal prospect, Akiira in this example.

  4. SQL Server creates an empty SQL Server database. Click OK and exit SQL Server Management Studio. Ensure GeoData Manager can access the new database.

  5. Now start GeoData Manager and at the database manager window, click New DB:

  6. The Create new database window appears. Follow the procedure to install an SQL server database.

Then

When you first select the new database in GeoData Manager's Database Manager:

  1. GeoData Manager asks for the mapping parameters for the new database's geothermal field see here

  2. If you have chosen that the database will have user permissions then set these up see here.

Adding an existing database to GeoData Manager

The database must be a GeoData Manager database, created by the current version or an earlier version of GeoData Manager. You might add an existing database to the Database Manager if a colleague gives you a GeoData Manager database or if you earlier removed the database from the Database Manager and now want to use it again.

  1. Ensure the database is on your computer system where GeoData Manager can access it.

  2. Now start GeoData Manager and at the database manager window, click Add DB:

    The Add database window appears.

  3. To add an access database, follow this procedure.

    To add an SQL server database, follow this procedure.

Update the connection to a database in GeoData Manager if you move the database to a different place on your computer, or if you rename a database file.

  1. Open the Database Manager window.

  2. Click Edit DB:

  3. To update to an access database, follow this procedure.

    To update to an SQL server database, follow this procedure.

Removing a database from GeoData Manager

When you remove a database it only removes the database name from the Database Manager. It does not delete the database or any of your data in the database. You can add the database back to the Database Manager later.

  1. Open the Database Manager window.

  2. Click Remove DB.

  3. Click Yes.

Deleting a database

Note:

To delete an Access database

  1. Find the location of the database on your PC.

  2. The database is one file, ending in .mdb. Use Windows Explorer to delete the file.

To delete an SQL Server database

Use SQL Server Management Studio to delete the database.


Installing an Access database

This procedure is common to several database procedures above.

  1. In the Create new database or Add database or Edit database window:

    Click Build.

  2. If you are creating or adding a database, the Provider tab opens:

    Click Microsoft Jet 4.0 OLE DB Provider, and click Next >>.

  3. The Connection tab opens:

    Enter the database name: the full database file path (.mdb file):

    • either type or paste the path if you know it,

    • or click , navigate to the folder with the .mdb file, click the file and click OK.

  4. Click Test Connection to ensure GeoData Manager can find the database:

  5. Click OK to return to the Create new database or Add database or Edit database window again:

  6. Click OK:

  7. Enter a GeoData Manager name for the database; this does not change the underlying name. Click OK:

  8. Finally, if you are creating a new database, GeoData Manager asks for the mapping parameters at your geothermal prospect read more.

GeoData Manager will now create all the tables in the database, populate some tables with system values, add the database to the Database Manager and return to the Database Manager. This might take a while.


Installing an SQL Server database

This procedure is common to several database procedures above.

  1. In the Create new database or Add database or Edit database window:

    Click Build.

  2. If you are creating or adding a database, the Provider tab opens:

    Click Microsoft OLE DB Provider for SQL Server, and click Next >>.

  3. The Connection tab opens:

    Click Use Windows NT Integrated security. Select the database (Akiira in this example) from the drop-down list.

  4. Click Test Connection to ensure GeoData Manager can find the database:

  5. Click OK to return to the Create new database or Add database or Edit database window again:

  6. Click OK:

  7. Enter a GeoData Manager name for the database; this does not change the underlying name. Click OK:

  8. GeoData Manager will now ask if you have dbo rights, necessary to create a new database:

    Warning. You must have Admin permission plus either be a dbo user or you and other GeoData Manager users must all be members of a db_owner role for this database read more. If you have these rights and permissions, click OK.

  9. Finally, if you are creating a new database, GeoData Manager asks for the mapping parameters at your geothermal prospect read more.

GeoData Manager will now create all the tables in the database, populate some tables with system values, add the database to the Database Manager and return to the Database Manager. This might take a while.

Note: When you create a new database, you are automatically granted Admin permissions to this database. If necessary, use GeoData Manager's Permission Manager and use the Edit or New command to grant other users permission to use the new database read more.